main(){char s[101];gets(s);int i=0,u=0;while(s[i]!=0){u+=s[i]-48;i++;}printf("%d",u);}