#include <stdio.h>
main() {
int sum=0;
char buf[1024], *p;
gets(buf);
for (p = buf; *p && *p != ' '; p++)
sum += *p;
printf("%d\n", sum);
}