#include<iostream> using namespace std; int main() { int i=0,n; cin>>n; while(n!=0){ i=i+n%10; n=n/10; } cout<<i; return 0; }