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