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