source_code: import java.io.*;
  import java.util.*;
  
  public class A {
  
  	BufferedReader br;
  	PrintWriter out;
  	StringTokenizer st;
  	boolean eof;
  
  	void solve() throws IOException {
  		String s = nextToken();
  		int res = Integer.parseInt(s);
  		
  		String s1 = s.substring(0, s.length() - 1);
  		res = Math.max(res, Integer.parseInt(s1));
  		
  		String s2 = s.substring(0, s.length() - 2) + s.charAt(s.length() - 1);
  		res = Math.max(res, Integer.parseInt(s2));
  		
  		out.println(res);
  	}
  
  	A() throws IOException {
  		br = new BufferedReader(new InputStreamReader(System.in));
  		out = new PrintWriter(System.out);
  		solve();
  		out.close();
  	}
  
  	public static void main(String[] args) throws IOException {
  		new A();
  	}
  
  	String nextToken() {
  		while (st == null || !st.hasMoreTokens()) {
  			try {
  				st = new StringTokenizer(br.readLine());
  			} catch (Exception e) {
  				eof = true;
  				return null;
  			}
  		}
  		return st.nextToken();
  	}
  
  	String nextString() {
  		try {
  			return br.readLine();
  		} catch (IOException e) {
  			eof = true;
  			return null;
  		}
  	}
  
  	int nextInt() throws IOException {
  		return Integer.parseInt(nextToken());
  	}
  
  	long nextLong() throws IOException {
  		return Long.parseLong(nextToken());
  	}
  
  	double nextDouble() throws IOException {
  		return Double.parseDouble(nextToken());
  	}
  }