codeparrot/codecomplex huggingface dataset:
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.util.*;
import java.io.*;

public class ProbA {
  int account;

  void start(Scanner sc, PrintStream out) {
    int ans = 0;
    account = sc.nextInt();
    int account1 = account / 10; 
    int account2 = (account - (account % 100)) / 10 + (account % 10); 
   
    out.println(Math.max(account1, Math.max(account, account2)));
  }

  public static void main(String[] args)  {
    Scanner sc = new Scanner(System.in);
    PrintStream out = System.out;

    new ProbA().start(sc, out);

  }

}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;


public class A {
	
	static class Scanner{
		BufferedReader br=null;
		StringTokenizer tk=null;
		public Scanner(){
			br=new BufferedReader(new InputStreamReader(System.in));
		}
		public String next() throws IOException{
			while(tk==null || !tk.hasMoreTokens())
				tk=new StringTokenizer(br.readLine());
			return tk.nextToken();
		}
		public int nextInt() throws NumberFormatException, IOException{
			return Integer.valueOf(next());
		}
		public double nextDouble() throws NumberFormatException, IOException{
			return Double.valueOf(next());
		}
	}
	
	public static void main(String args[]) throws NumberFormatException, IOException{
		Scanner sc = new Scanner();
		int T = sc.nextInt();
		if ( T > 0)
			System.out.println(T);
		else{
			String cad = (T + "");
			int min = Math.min(cad.charAt(cad.length() - 1) - '0', cad.charAt(cad.length() - 2) - '0');
			if (min == 0 && cad.length() == 3)
				System.out.println(0);
			else
				System.out.println(cad.substring(0, cad.length() - 2) + "" + min);
		}
	}

	
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;


public class A {	
	BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter out;
    
	public void solve() throws IOException {				
		int N = nextInt();
		if( N >= 0) {
			out.println(N);
			return;
		}
		
		int ans = N/10;
		int ans2 = N/100*10 + N%10;
		out.println( Math.max(ans, ans2));
		
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new A().run();
	}
	
	public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            out = new PrintWriter(System.out);
            solve();
            reader.close();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.IOException;
import java.util.Locale;
import java.util.Scanner;

public class A {

    public void processInput() throws IOException {
        Scanner in = new Scanner(System.in);

        long n = in.nextLong();
        long res = go(n);

        System.out.printf(Locale.ENGLISH, "%d\n", res);

        in.close();
    }

    public long go(long n) {

        long res = n;

        String str = String.valueOf(n);
        
        StringBuilder sb = new StringBuilder(str);
        sb.deleteCharAt(str.length() - 1);
        if (sb.length() > 0 && !sb.toString().equals("-")) {
            res = Math.max(res, Long.valueOf(sb.toString()));
        }
        
        if (str.length() > 1) {
            if (str.charAt(str.length() - 2) != '-') {
                sb = new StringBuilder(str);
                sb.deleteCharAt(str.length() - 2);
                res = Math.max(res, Long.valueOf(sb.toString()));
            }
        }
        
        return res;
    }

    public static void main(String[] args) throws Exception {
        A a = new A();
        a.processInput();
    }
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import java.io.*;
import java.util.*;

/**
 *
 * @author N-AssassiN
 */
public class Main {

    private static BufferedReader reader;
    private static BufferedWriter out;
    private static StringTokenizer tokenizer;
    //private final static String filename = "filename";

    private static void init(InputStream input, OutputStream output) {
        reader = new BufferedReader(new InputStreamReader(input));
        out = new BufferedWriter(new OutputStreamWriter(output));
        //reader = new BufferedReader(new FileReader(filename + ".in"));
        //out = new BufferedWriter(new FileWriter(filename + ".out"));
        tokenizer = new StringTokenizer("");
    }

    private static String nextLine() throws IOException {
        return reader.readLine();
    }

    private static String next() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(nextLine());
        }
        return tokenizer.nextToken();
    }

    private static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    private static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    private static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        init(System.in, System.out);
        int n = nextInt();
        //long startTime = System.currentTimeMillis();
        if (n > 0) {
            out.write(n + "\n");
        } else {
            String s = n + "";
            String s2 = s.substring(0, s.length() - 1);
            String s3 = s.substring(0, s.length() - 2) + s.charAt(s.length() - 1);
            int a = Integer.parseInt(s2);
            int b = Integer.parseInt(s3);
            int ans = Math.max(a, b);
            out.write(ans + "\n");
        }
        //long runTime = System.currentTimeMillis() - startTime;
        //out.write(runTime + "\n");
        out.flush();
    }
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.*;

public class Main {
	
	StreamTokenizer in;
	int n, k;
	
	public void run() {
		in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
		read();
		print(solve());
	}
	
	void read() {
		n = nextInt();
//		k = nextInt();
	}
	
	int solve() {
		int result = n;
		if (result < 0) {
			int res1 = n / 10;
			int mod = n % 10;
			
			int res2 = res1 / 10 * 10 + mod;
			if (res1 > res2)
				result = res1;
			else
				result = res2;
		}
		
		return result;
	}
	
	void print(int result) {
		System.out.println(result);
	}
	
	
	public static void main(String[] Args) {
			new Main().run();
	}
	
	public int nextInt() {
		try {
			in.nextToken();
		}
		catch (Exception e) {}
		return (int)in.nval;
	}
	
	public String nextString() {
		try {
			in.nextToken();
		}
		catch (Exception e) {}
		return in.sval;
	}
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;



public class BankAccount {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		String s = in.readLine();
		int n = Integer.parseInt(s);

		if (s.charAt(0) == '-')
			if (Integer.parseInt(s.substring(0, s.length()-1))>Integer.parseInt(s.substring(0, s.length()-2)+s.charAt(s.length()-1)))
				s=s.substring(0, s.length()-1);
			else
				s=s.substring(0, s.length()-2)+s.charAt(s.length()-1);

		System.out.println(Integer.parseInt(s));
		in.close();
	}

}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
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());
	}
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;


public class A {
    
    static StringTokenizer st;
    static BufferedReader in;
    static PrintWriter pw;
    
    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int n = nextInt();
        int n1 = n/10;
        int s = n % 10;
        int n2 = n / 100 * 10+s;
        System.out.println(Math.max(n, Math.max(n1, n2)));
        pw.close();
    }
    private static int nextInt() throws IOException{
        return Integer.parseInt(next());
    }
    
    private static long nextLong() throws IOException{
        return Long.parseLong(next());
    }
    
    private static double nextDouble() throws IOException{
        return Double.parseDouble(next());
    }
    
    private static String next() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;


public class TaskA implements Runnable {
	
	@Override
	public void run() {
		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int n = in.readInt();
		if (n > 0) {
			out.println(n);
		}
		else {
			int nn = -n;
			int x = nn/10;
			int lastDigit = nn%10;
			int y = 10*(x/10) + lastDigit;
			x = -x;
			y = -y;
			out.println(x > y ? x : y);
		}
		out.flush();
	}

	public static void main(String[] args) {
		new TaskA().run();
	}
	
	private class InputReader {
		
	    public BufferedReader reader;
	    public StringTokenizer tokenizer;

	    public InputReader(InputStream stream) {
	        reader = new BufferedReader(new InputStreamReader(stream));
	        tokenizer = null;
	    }

	    public String next() {
	        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
	            try {
	                tokenizer = new StringTokenizer(reader.readLine());
	            } catch (IOException e) {
	                throw new RuntimeException(e);
	            }
	        }
	        return tokenizer.nextToken();
	    }
	    
	    public int readInt() {
	    	return Integer.parseInt(next());
	    }
	    
	}

}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author George Marcus
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int N = in.nextInt();
        if(N >= 0)
            out.println(N);
        else {
            N = Math.abs(N);
            int v1 = - (N / 10);
            int v2 = - (N / 100 * 10 + (N % 10));
            out.println(Math.max(v1, v2));
        }
    }
}

class InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int nextInt() {
        return Integer.parseInt(nextString());
    }

    public String nextString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));

        return res.toString();
    }

    private boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    }
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class CFA {

	private void work() throws IOException {
		Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(
				System.in)));
		while (sc.hasNextInt()) {
			int n = sc.nextInt();
			int a = n;
			int b = n / 10;
			int c;
			if (n < 0) {
				n = -n;
				c = -((n / 100) * 10 + n % 10);
			} else {
				c = (n / 100) * 10 + n % 10;
			}
			System.out.println(Math.max(a, Math.max(b, c)));
		}
		System.out.close();
	}

	private int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	}

	public static void main(String[] args) throws IOException {
		new CFA().work();
	}

}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.util.Scanner;


public class A {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Account acnt = new Account();
		acnt.solve();
		acnt.print();
	}

}

class Account {
	
	Account() {
		Scanner scr = new Scanner(System.in);
		n = scr.nextInt();
	}
	
	void solve() {
		if (n > 0) {
			ans = n;
		}
		else {
			int nn = -n;
			int ans1 = nn/10;
			int ans2 = nn % 10 + (nn/100)*10;
			if (ans1 < ans2){
				ans = -ans1;
			}
			else {
				ans = -ans2;
			}
		}
		
	}
	
	void print(){
		System.out.println(ans);
	}
	
	int ans;
	int n;
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.GregorianCalendar;
import java.util.Scanner;


public class ProblemB {

    
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        
        int a = s.nextInt();
        
        int f1 = a/10;
        
        int b = a;
        int last = a%10;
        
        b/=10;
        b/=10;
        b*=10;
        b+=last;
        
        System.out.println(Math.max(a, Math.max(f1, b)));
        
        
        
    }

}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Scanner;

/** UVA 10130 - SuperSale */
public class Main {
    
    
    /** totally n products, max Weight is w */
        
    public static void main(String[] args) throws Exception {
         Scanner sc = null;
         PrintWriter pr = null;

         pr=new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
         sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
         //sc = new Scanner(new File("input.txt"));
            
         long n = sc.nextInt();
         if (n > 0) pr.println(n);
         else {
             long n1 = n / 10;
             long n2 = n / 100 * 10  + n % 10;
             if (n1 < n2) pr.println(n2);
             else pr.println(n1);
         }
         
         pr.close();
         sc.close();
    }
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.util.*;

public class Bank{
	public static void main(String[] args){
		Scanner reader = new Scanner(System.in);
		int in = reader.nextInt();
		int sign = (int)Math.signum(in);
		
		String str = Math.abs(in)+"";
		if(str.length() == 1){
			if(in < 0)
				System.out.println(0);
			else
				System.out.println(in);
			return;
		}
		
		int max = in;
		max = Math.max(max, sign * Integer.parseInt(str.substring(0,str.length()-1)));
		max = Math.max(max, sign * Integer.parseInt(str.substring(0,str.length()-2) + str.charAt(str.length()-1)));
		System.out.println(max);
	}
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.*;
import java.util.*;

public class first
{
	int max(int a1,int a2,int a3)
	{
		int max=a1;
		if(a2>=max)
			max=a2;
		if(a3>=max)
			max = a3;
		return max;	
	}
	
	public static void main(String[] args)
	{
		int num=0;
		
		Scanner sc = new Scanner(System.in);
		num = sc.nextInt();
		int num2 = num/10;
		int num3 = num%10;
		int num4 = (num2/10)*10+num3;
		first fs = new first();
		int result = fs.max(num,num2,num4);
		System.out.println(result);
	}
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.InputStreamReader;
import java.io.IOException;
import java.text.BreakIterator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

public class palin {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(System.out);
		Scanner scan = new Scanner(System.in);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
	public void solve(int testNumber, InputReader in, PrintWriter out) {
		int n = in.nextInt();
		if (n >= 0) {
			out.print(n);
			return;
		}
		if (n / 10 >= (n / 100) * 10 + n % 10) {
			out.print(n / 10);
			return;
		}
		out.print((n / 100) * 10 + n % 10);
	}
}

class InputReader {
	BufferedReader br;
	StringTokenizer st;

	public InputReader(InputStream in) {
		br = new BufferedReader(new InputStreamReader(in));
		st = null;
	}

	public String next() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return st.nextToken();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant

/**
 *
 * @author saurabh
 */
public class myTemplate {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws Exception{
        // TODO code application logic here
       java.io.BufferedReader br = new java.io.BufferedReader(new 
                 java.io.InputStreamReader(System.in));
       
       int ch[],arr[];
       int x,i,j,k,t,n=Integer.parseInt(br.readLine());
        //System.out.println(n);
        
       if(n>0)
            System.out.println(n);
       else
       {
           //n= -n;
           //n=-n;
           x= n/100;
           
           x = x*10 + n%10;
         //  System.out.println(x);
           if(n/10 > x)
               System.out.println(n/10);
           else
              System.out.println(x);
           
       }
       
    }
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.*;
import java.util.*;

public class A {
  public static void main(String[] args){
    FastScanner sc = new FastScanner();
    int n = sc.nextInt();
    String nStr = Integer.toString(n);

    String nStr1 = nStr.substring(0, nStr.length() - 1);
    String nStr2 = nStr.substring(0, nStr.length() - 2) + nStr.charAt(nStr.length() - 1);

    int result = Math.max(n, Integer.parseInt(nStr1));
    result = Math.max(result, Integer.parseInt(nStr2));
    System.out.println(result);
  }

  public static class FastScanner {
    BufferedReader br;
    StringTokenizer st;

    public FastScanner(String s) {
      try {
        br = new BufferedReader(new FileReader(s));
      } catch (FileNotFoundException e) {
        e.printStackTrace();
      }
    }

    public FastScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String nextToken() {
      while (st == null || !st.hasMoreElements()) try {
        st = new StringTokenizer(br.readLine());
      } catch (IOException e) {
        e.printStackTrace();
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(nextToken());
    }

    long nextLong() {
      return Long.parseLong(nextToken());
    }

    double nextDouble() {
      return Double.parseDouble(nextToken());
    }
  }
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.*;

public class Main {
  public static void main(String args[]) throws IOException {
    BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
    String line = stdin.readLine();
    int n = Integer.parseInt(line);
    
    if (n >= 0) {
      System.out.println(n);
    } else if (n > -10) {
      System.out.println(0);
    } else {
      String sa = line.substring(0, line.length() - 1);
      int a = Integer.parseInt(sa);
      String sb = line.substring(0, line.length() - 2) + line.charAt(line.length() - 1);
      int b = Integer.parseInt(sb);
      System.out.println(Math.max(a, b));
    }
  }
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.PrintWriter;
import java.util.Scanner;

public class C186D2A {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = in.nextInt();
		if (n >= 0) {
			out.println(Math.abs(n));
		} else {
			out.println(Math.max(n/10, (n/100)*10 + n%10));
		}
		out.flush();
	}
}