#include using namespace std; int main() { string S; cin >> S; int ans = 0; for (auto c : S) ans += c - '0'; cout << ans << "\n"; }