#include<bits/stdc++.h>
using namespace std;
int main(){
	int i,x,y;
	cin>>i;
	x=i%10;
	y=i/10%10;
	cout<<x+y;
}
/**************************************************************
	Problem: 1605
	User: baizhoudeyueguang
	Language: C++
	Result: Accepted
	Time:11 ms
	Memory:2072 kb
****************************************************************/