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