#include <stdio.h>
using namespace std;
int main() {
int w;
scanf("%d", &w);
printf("%d", w/100 + (w/10)%10 + w%10);
return 0;
}
/**************************************************************
Problem: 1716
User: zhangyilei
Language: C++
Result: Accepted
Time:21 ms
Memory:1144 kb
****************************************************************/