#include using namespace std; #define ll long long #define endl "\n" #define rep(i, a, n) for (int i = a; i < n; ++i) int main() { string s; cin >> s; int ans = 0; rep(i, 0, s.length()) ans += s[i] - '0'; cout << ans << endl; return 0; }