#include<iostream> using namespace std; int main(){ int a,m,b,c; cin>>m; a=m%10; b=(m/10)%10; c=m/100; cout<<a+b+c<<endl; return 0; }