/*==========================================================================*/ /* auther: Dev1ce created: 08.04.2024 21:18:22 */ /*--------------------------------------------------------------------------*/ #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string s; cin >> s; int n = stoi(s); int sum = 0; while (n > 0) { sum += n % 10; n /= 10; } cout << sum << '\n'; return 0; }