#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a; cout<<a%10+a/10%10+a/100; }