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