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