#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c,e,x,num;
scanf("%d",&x);
a=x/100%10;
b=x/10%10;
c=x/1%10;
e=x/1000%10;
printf("%d",num=a+b+c+e);
system ("pause");
return 0;
}
#include <stdlib.h>
int main()
{
int a,b,c,e,x,num;
scanf("%d",&x);
a=x/100%10;
b=x/10%10;
c=x/1%10;
e=x/1000%10;
printf("%d",num=a+b+c+e);
system ("pause");
return 0;
}