#include<bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
int hundreds = x / 100;
int tens = (x % 100) / 10;
int units = x % 10;
int sum = hundreds + tens + units;
cout << sum << endl;
return 0;
}
/**************************************************************
Problem: 1027
User: huanghao
Language: C++
Result: Accepted
Time:7 ms
Memory:2072 kb
****************************************************************/