include <stdio.h>int sum(int n){ if(n == 0) return 0; else return n % 10 + sum(n / 10);}int main(void){ int n; scanf("%d", &n); printf("%d\n", sum(n)); return 0;}
include <stdio.h> int sum(int n){ if(n==0) return 0;else return n%10+sum(n/10);} void main(){ int n;scanf("%d",&n);printf("%d\n",sum(n));}