#include<bits/stdc++.h> using namespace std; int main() { int N,s; cin>>N; while(N) { s+=N%10; N/=10; } cout<<s; return 0; } /************************************************************** Problem: 1119 User: ccf Language: C++ Result: Wrong Answer ****************************************************************/