#include int main() { char s[101]; scanf("%s", s); int ans=0; for (int i=0; s[i]!='\0'; i++) { ans+=s[i]-'0'; } printf("%d", ans); return 0; }