#include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; int x=a%10; int y=a/10%10; int z=a/100; cout<<x+y+z; return 0; }