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