#include<bits/stdc++.h>
using namespace std;
int main(){
	int m,a,b,x;
	cin>>m;
	a=m%10;
	b=m/10;
	x=a*10+b;
	if(x>m){
		cout<<x;
	}else{
		cout<<m;
	}
	
}

/**************************************************************
	Problem: 1734
	User: zhengzihao3
	Language: C++
	Result: Accepted
	Time:7 ms
	Memory:2072 kb
****************************************************************/