#include using namespace std; int main() { int i; int iSum; char S[ 200 ]; char C; cin >> S; iSum = 0; i = 0; C = S[ i ]; while( C >= '0' && C <= '9' ) { iSum += (int) ( C - '0' ); i++; C = S[ i ]; } cout << iSum << endl; return 0; }