#include #include int main(void) { int i,j,score,scoreSum,scoreArray[9]; double power; scanf("%d",&score); for (i = 0; i < 9; i++) { power = pow(10,i); scoreArray[i] = (int)(score/power)%10; } for (j = 0; j < 9; j++) { if (scoreArray[j] != 0) { scoreSum += scoreArray[j]; }else { scoreSum += 10; } } printf("%d\n",scoreSum); return 0; }