#include<bits/stdc++.h>
using namespace std;
int main(){
int r,m,a,b,c;
cin>>r;
a=r%10;
b=r/10%10;
c=r/100;
m=a+b+c;
cout<<m;
}
/**************************************************************
Problem: 1716
User: zhengzihao3
Language: C++
Result: Accepted
Time:22 ms
Memory:2072 kb
****************************************************************/