#include<bits/stdc++.h>
using namespace std;
{int x,s,a,b,c; 
cin>>x;
a=x%10;
b=x/10%10;
c=x/100;
s=a+b+c;
cout<<s;
	return 0;
int main()
}
/**************************************************************
	Problem: 1027
	User: lyy002
	Language: C++
	Result: Compile Error
****************************************************************/