#include<iostream> using namespace std; int main() { int a,b,c,d; cin>>d; a=int(d/100); b=int(d/10)-a*10; c=d%10; cout<<a+b+c; }