#include<bits/stdc++.h>
using namespace std;
int main(){
	int x,h,g,s,b;
	cin>>x;
	h=x/100+x/10%10+x%10;
	x=g+s*10+b*100;
	cout<<h;
} 
/**************************************************************
	Problem: 1027
	User: sucongyi
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2072 kb
****************************************************************/