#include <cstdio>

int main() {
    int weight;
    scanf("%d", &weight);  // 读取爸爸的体重
    
    int hundred = weight / 100;        // 百位数
    int ten = (weight / 10) % 10;      // 十位数
    int unit = weight % 10;            // 个位数
    
    int result = hundred + ten + unit; // 计算各位数字之和
    printf("%d\n", result);            // 输出结果
    
    return 0;
}
/**************************************************************
	Problem: 1716
	User: huangcanwu
	Language: C
	Result: Compile Error
****************************************************************/