#include using namespace std; int main() { string S; cin >> S; int N = S.size(); int ans = 0; for (int i = 0; i < N; i++) { ans += S[i] - '0'; } cout << ans; }