#include #include int main(void) { char S[] = ""; int i_S = 0; int i = 0; int tmp = 0; int sum = 0; scanf("%s",S); i_S = atoi(S); tmp = i_S; for(i=0;i<9;i++){ if(tmp % 10 == 0) sum += 10; else sum += tmp % 10; tmp /= 10; } printf("%d\n",sum); return 0; }