#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int g=n%10,s=n%100/10,b=n/100; cout<<g+s+b; return 0; }