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