#include<bits/stdc++.h>
using namespace std;
int main(){
int n,a,b,c,y,f,e;
cin>>n;
a=n%10;
b=n/10;
c=n/100;
d=n/1000;
f=n/10000;
e=a+b+c+d+f;
cout<<e;
return 0;
}
/**************************************************************
Problem: 1418
User: zhenghaoxuan
Language: C++
Result: Compile Error
****************************************************************/