#include <stdio.h> int main() { int a,wei,sum=0; scanf("%d", &a); while(a>0){ int j=a%10; sum+=j; a=a/10; } printf("%d",sum); return 0; }