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