#include <stdio.h>
int main() {
int n, sum = 0;
while (n > 0) {
sum += n % 10;
n /= 10;
}
printf("The sum of digits is %d\n", sum
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICBpbnQgbiwgc3VtID0gMDsKCiAgcHJpbnRmKCJFbnRlciBhIG51bWJlcjogIik7CiAgc2NhbmYoIiVkIiwgJm4pOwoKICB3aGlsZSAobiA+IDApIHsKICAgIHN1bSArPSBuICUgMTA7CiAgICBuIC89IDEwOwogIH0KCiAgcHJpbnRmKCJUaGUgc3VtIG9mIGRpZ2l0cyBpcyAlZFxuIiwgc3VtKTsKCiAgcmV0dXJuIDA7Cn0=