#include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; int g=a%10; int s=a/10%10; int b=a/100; cout<<g+s+b; return 0; }