#include <iostream>
using namespace std;
int main() {
int x;
cin >> x;
int hundreds = x / 100;
int tens = (x / 10) % 10;
int units = x % 10;
int S = hundreds + tens + units;
cout << S << endl;
return 0;
}
/**************************************************************
Problem: 1027
User: fuyijun
Language: C++
Result: Accepted
Time:6 ms
Memory:2072 kb
****************************************************************/