#include using namespace std ; int main(){ int a , answer ; cin >> a ; while(a>0){ answer += a%10 ; a /= 10 ; } cout << answer << endl ; }