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