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