#include #include #define rep(i,n) for (int i=1; i <= (n); ++i) #define all(a) a.begin(), a.end() using ll = long long; using namespace std; // ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } // const double PI = acos(-1); int main() { string s; cin >> s; int sum = 0; rep(i,s.size()) { int n = (s[i] -'0'); sum += n; } cout << sum << endl; return 0; }