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