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