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