#include<bits/stdc++.h>
using namespace std;
int main(){
int x,g,s,b,h=0;
cin>>x;
g=x%10;
s=x/10%10;
b=x/100;
h=g+s+b;
cout<<h;
return 0;
}
/**************************************************************
Problem: 1027
User: zhangchenhao
Language: C
Result: Compile Error
****************************************************************/