#include #include using namespace std; int main() { string s; cin >> s; int length = s.length(); int sum = 0, num = 0; for (int i = 0;i < length;i++) { num = s[i] - 48; sum = sum + num; } cout << sum; }