codeparrot/codecomplex huggingface dataset:
// 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 {
	
	private static StringTokenizer tokenizer;
    private static BufferedReader bf;
    private static PrintWriter out;
    
	private static int nextInt() throws IOException {
    	return Integer.parseInt(nextToken());
    }
    
    @SuppressWarnings("unused")
	private static long nextLong() throws IOException {
    	return Long.parseLong(nextToken());
    }
    
    private static String nextToken() throws IOException {
    	while(tokenizer == null || !tokenizer.hasMoreTokens()) {
    		tokenizer = new StringTokenizer(bf.readLine());
    	}
    	return tokenizer.nextToken();
    }
    
	public static void main(String[] args) throws IOException {
		bf = new BufferedReader(new InputStreamReader(System.in));
    	tokenizer = null;
    	out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    	int n = nextInt();
    	if(n >= 0) out.println(n);
    	else {
    		n = -n;
    		int a = n % 10; int m = n/10;
    		int b = m % 10;
    		if(a >= b) {
    			if(m == 0) out.println(0);
    			else out.println(-m);
    		}
    		else {
    			m = (m-b)+a;
    			if(m == 0) out.println(0);
    			else out.println(-m);
    		}
    	}
    	out.close();
	}

}
// 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.ArrayList;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.TreeMap;

public class A {
    private static BufferedReader in;
    private static StringTokenizer st;
    private static PrintWriter out;
    
    public static void main(String[] args) throws NumberFormatException, IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        st = new StringTokenizer("");
        out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int n = nextInt();
        int max = n;
        max = Math.max(max, n / 10);
        max = Math.max(max, (n / 100) * 10 + n % 10);
        System.out.println(max);
    }
    

    static String next() throws IOException{
        while(!st.hasMoreTokens()){
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
    static int nextInt() throws NumberFormatException, IOException{
        return Integer.parseInt(next());
    }
    static long nextLong() throws NumberFormatException, IOException{
        return Long.parseLong(next());
    }
    
    static double nextDouble() throws NumberFormatException, IOException{
        return Double.parseDouble(next());
    }

}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant


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

public class problemB185 {

	public static void main(String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringBuffer sb=new StringBuffer();
		int n=Integer.parseInt(br.readLine());
		
		if(n<0){
			int temp=-n;
			int temp2=temp/10;
			int x=temp%10;
			int y=temp2%10;
			if(x>y){
				temp=temp/10;
			}
			else{
				temp=temp/10 -y +x;
			}
			n=-temp;
			
			
		}
		System.out.println(n);
		
		}
		
	
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws NumberFormatException,
			IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(br.readLine());
		String s = n + "";
		if (n >= 0)
			System.out.println(n);
		else {
			int a = n, b = Integer.parseInt(s.substring(0, s.length() - 1)), c = Integer.parseInt(s.substring(0, s.length()-2)+s.charAt(s.length()-1));
			System.out.println(Math.max(a, Math.max(b,c)));
		}
	}
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.util.Scanner;


public class A {

	static Scanner scanner = new Scanner(System.in);
	static int s;

	public static void main(String[] args) {
		s = scanner.nextInt();
		if (s >= 0) {
			System.out.println(s);
		}
		else {
			if (s >= -10) {
				System.out.println(0);
			}
			else {
				int ss = -s;
				int a, b;
				a = ss % 10;
				b = (ss % 100) / 10;
				if (a > b) {
					ss = ss / 10;
				}
				else {
					ss = (ss / 100) * 10 + a;
				}
				if (ss == 0) {
					System.out.println(0);
				}
				else {
					System.out.println("-" + ss);
				}
			}
		}
	}

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

import static java.lang.Integer.*;
import static java.lang.Math.*;
public class A {
	public static void main(String[] args) throws Throwable{
		BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
		String ln=in.readLine().trim();
		System.out.println(max(parseInt(ln),max(parseInt(ln.substring(0,ln.length()-1)),parseInt(ln.substring(0, ln.length()-2)+ln.substring(ln.length()-1)))));
	}
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.BufferedInputStream;
import java.io.PrintStream;
import java.util.Scanner;


public class Main {
	public static void main(String[] args) {
		Scanner in=new Scanner(new BufferedInputStream(System.in));
		PrintStream out=System.out;
		int n=in.nextInt();
		if (n>=0) out.println(n);
		else out.println(Math.max(-((-n)/10), -((-n)/100*10+(-n)%10)));
		out.close();
		in.close();
	}
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String [] args ) {
		try{
			String str;			
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			BufferedOutputStream bos = new BufferedOutputStream(System.out);
			String eol = System.getProperty("line.separator");
			byte [] eolb = eol.getBytes();
			byte[] spaceb= " ".getBytes();


			str  = br.readLine();

			int n = Integer.parseInt(str);
			int ans = 0;
			if(n>=0) {
				ans = n;
			} else {
				 if ( str.length()==2) {
					if(str.charAt(0)!='-') {
						int a  =Integer.parseInt(str.substring(0,1));
						int b = Integer.parseInt(str.substring(1,2));
						ans = Math.max(a, b);
					} else {
						ans = Integer.parseInt(str.substring(1,2));
					}
				} else {
					String s1 = str.substring(0,str.length()-2).concat(str.substring(str.length()-2,str.length()-1));
					String s2 = str.substring(0,str.length()-2).concat(str.substring(str.length()-1,str.length()));
					int a = Integer.parseInt(s1);
					int b = Integer.parseInt(s2);
					ans = Math.max(a, b);
				}
			}
			bos.write(new Integer(ans).toString().getBytes());
			bos.write(eolb);
			bos.flush();
		}  catch(IOException ioe) {
			ioe.printStackTrace();
		}
	}
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.util.*;

public class Main{

    void solve(){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int n1 = n/10;
        int n2 = n/100*10 + n%10;

        int ans = n;
        ans = Math.max(ans, n1);
        ans = Math.max(ans, n2);
        System.out.println(ans);
    }

    public static void main(String[] args){
        new Main().solve();
    }
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.*;
import java.util.*;
import java.math.*;

public class A {
    public static void main(String[] args) { 
        OutputStream outputStream = System.out;
        PrintWriter out = new PrintWriter(outputStream);

        Application solver = new Application();
        solver.solve(System.in, out);

        out.close();
    }
}


class Application {
    int max(int a, int b) { return a > b ? a : b; }
    public void solve(InputStream in, PrintWriter out) {
        Scanner scanner = new Scanner(in);

        int n = scanner.nextInt();
        int n1 = n/10;
        int n2 = (n/100)*10+(n%10);
        int m = max(max(n1, n2), n);

        out.println(m);
    }
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import static java.util.Arrays.deepToString;

import java.awt.datatransfer.StringSelection;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class Main {

    static void solve() throws IOException {
        int n = nextInt();
        if (n >= 0) {
            System.out.println(n);
        } else {
            String string = String.valueOf(n);
            int v1 = Integer.valueOf(string.substring(0, string.length() - 1));
            int v2 = Integer.valueOf(string.substring(0, string.length() - 2)
                    + string.charAt(string.length() - 1));
            if (v1 >= v2) {
                System.out.println(v1);
            } else {
                System.out.println(v2);
            }
        }
        
    }

    public static void main(String[] args) throws Exception {
        reader = new BufferedReader(new InputStreamReader(System.in));
        writer = new PrintWriter(System.out);

        setTime();
        solve();
        printTime();
        printMemory();

        writer.close();
    }

    static BufferedReader reader;
    static PrintWriter writer;
    static StringTokenizer tok = new StringTokenizer("");
    static long systemTime;

    static void debug(Object... o) {
        System.err.println(deepToString(o));
    }

    static void setTime() {
        systemTime = System.currentTimeMillis();
    }

    static void printTime() {
        System.err.println("Time consumed: "
                + (System.currentTimeMillis() - systemTime));
    }

    static void printMemory() {
        System.err.println("Memory consumed: "
                + (Runtime.getRuntime().totalMemory() - Runtime.getRuntime()
                        .freeMemory()) / 1000 + "kb");
    }

    static String next() {
        while (!tok.hasMoreTokens()) {
            String w = null;
            try {
                w = reader.readLine();
            } catch (Exception e) {
                e.printStackTrace();
            }
            if (w == null)
                return null;
            tok = new StringTokenizer(w);
        }
        return tok.nextToken();
    }

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

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

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

    static BigInteger nextBigInteger() {
        return new BigInteger(next());
    }
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.InputStream;

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

class TaskA {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        int balance = in.nextInt();
        if (balance >= 0) {
            out.println(balance);
            return;
        }

        balance = -balance;
        int a = balance / 100;

        int b = Math.min(balance % 10, (balance / 10) % 10);

        balance = -(a * 10 + b);

        out.println(balance);
    }
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.*;
import java.util.*;

public class Problem1 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		if (n < 0) {
			
			int first = n / 10;
			int second = (n / 100)*10 + (n % 10);
			if (first > second)
				System.out.println(first);
			else
				System.out.println(second);
		} else {
			System.out.println(n);
		}
	}

}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.*;
import java.util.*;
public class j
{
public static void main(String aa[])throws IOException
{
BufferedReader b=new BufferedReader(new InputStreamReader(System.in));
int i=0,m=0,p=0,n=0,k=0,j=0;
String s,r;
s=b.readLine();
r=s;
n=Integer.parseInt(s);
s=s.substring(0,s.length()-2);
s+=r.charAt(r.length()-1);
r=r.substring(0,r.length()-1);
m=Integer.parseInt(s);
p=Integer.parseInt(r);
System.out.print((long)Math.max(Math.max(m,n),p));
}
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;


public class A {
	public static void main(String[] args){
		FastScanner sc = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		String cur = sc.nextToken();
		int first = Integer.parseInt(cur);
		if(cur.length() > 1){
			String second = cur.substring(0,cur.length()-1);
			if(Character.isDigit(second.charAt(second.length()-1))){
				first = Math.max(first, Integer.parseInt(second));
			}
		}
		
		if(cur.length() > 2){
			String third = cur.substring(0,cur.length()-2) + cur.charAt(cur.length()-1);
			if(Character.isDigit(cur.charAt(cur.length()-2))){
				first = Math.max(first, Integer.parseInt(third));
			}
		}
		System.out.println(first);
		out.close();
	}

	public static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(String s) {
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				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) {
					// TODO Auto-generated catch block
					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 static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import java.io.*;
import java.math.*;
import java.util.*;

@SuppressWarnings("unused")
public class A {
	public static void main(String[] args) throws Exception {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		TreeSet<Integer> set = new TreeSet<Integer>();
		set.add(n);
		try {
			String s = Integer.toString(n);
			s = s.substring(0, s.length() - 1);
			set.add(Integer.parseInt(s));
		} catch (Exception e) {
		}
		try {
			String s = Integer.toString(n);
			s = s.substring(0, s.length() - 2) + s.charAt(s.length() - 1);
			set.add(Integer.parseInt(s));
		} catch (Exception e) {
		}
		System.out.println(max(set));
	}
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class Round313A {
	private static final int LOCAL_ENV = 0;

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		try {
			if (LOCAL_ENV == 1) {
				in = new Scanner(new File("input.txt"));
			}
		} catch (FileNotFoundException e) {
			in = new Scanner(System.in);
		}

		long n = in.nextLong();

		if (n >= -9) {
			System.out.println(n);
		} else {
			long absN = Math.abs(n);
			long m1 = -(absN / 10);
			long last = absN % 10;
			long m2 = -((absN / 100) * 10 + last);
			System.out.println(Math.max(m1, m2));
		}
	}
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String ns = sc.next();
		sc.close();
		
		int n1 = Integer.parseInt(ns);
		int n2 = Integer.parseInt(ns.substring(0, ns.length() - 1));
		int n3 = Integer.parseInt(ns.substring(0, ns.length() - 2) + ns.substring(ns.length() - 1));
		
		int max = n1;
		max = (n2 > max) ? (n2) : (max);
		max = (n3 > max) ? (n3) : (max);
		
		System.out.println(max);		
	}
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
/**
 * Created with IntelliJ IDEA.
 * User: Venky
 */

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

public class Main {
    static void solve() throws IOException {
        String str = br.readLine();
        StringBuffer sb1 = new StringBuffer(str);
        StringBuffer sb2 = new StringBuffer(str);
        StringBuffer sb3 = new StringBuffer(str);
        sb1.deleteCharAt(sb1.length()-1);
        sb2.deleteCharAt(sb2.length()-2);
        int n1 = Integer.parseInt(sb1.toString());
        int n2 = Integer.parseInt(sb2.toString());
        int n3 = Integer.parseInt(sb3.toString());
        out.println(Math.max(n1, Math.max(n2, n3)));
    }

    static BufferedReader br;
    static StringTokenizer st;
    static PrintWriter out;

    public static void main(String[] args) throws IOException {
        InputStream input = System.in;
        br = new BufferedReader(new InputStreamReader(input));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }

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

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

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

    static String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String line = br.readLine();
            if (line == null) {
                return null;
            }
            st = new StringTokenizer(line);
        }
        return st.nextToken();
    }
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.util.*;

public class ex1 {
	
	public static void main(String[] args)	{
		int n,i,j;
		Scanner scan = new Scanner(System.in);
		n = Integer.parseInt(scan.nextLine());
		if(n>=0)
			System.out.println(n);
		else if(n<0)	{
			n=-1*n;
			i=n/10;
			j=(n/100)*10+n%10;
			i=-i;
			j=-j;
			if(i>=j)
				System.out.println(i);
			else
				System.out.println(j);
		}
	}
	
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.*;

public class Main {
	
	public static void main(String[] args) throws Exception {
		
		int n = nextInt();
		String nn = Integer.toString(n);
		if(n >= 0){
			println(n);
		} else {
			println(Math.max(Integer.parseInt(nn.substring(0,nn.length() - 1)), Integer.parseInt(nn.substring(0, nn.length() - 2) + nn.charAt(nn.length() - 1))));
		}
	}
	
	private static PrintWriter out =  new PrintWriter(System.out);
	private static BufferedReader inB = new BufferedReader(new InputStreamReader(System.in));	
	private static StreamTokenizer in = new StreamTokenizer(inB);
	
	private static void exit(Object o) throws Exception {
		out.println(o);
		out.flush();
		System.exit(0);
	}
	private static void println(Object o) throws Exception{
		out.println(o);
		out.flush();
	}
	private static void print(Object o) throws Exception{
		out.print(o);
		out.flush();
	}
	private static long nextLong() throws Exception {
		in.nextToken();
		return (long)in.nval;
	}  
	private static int nextInt() throws Exception {
		in.nextToken();
		return (int)in.nval;
	}  
	private static String nextString() throws Exception {
		in.nextToken();
		return in.sval;        
	}
	
}
// Problem: 313_A. Ilya and Bank Account
// Time complexity: constant
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class CF {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        int n = in.nextInt();
        if (n >= 0) {
            out.println(n);
        } else {
            int res = n;
            n = Math.abs(n);

            String s = String.valueOf(Math.abs(n));
            if (s.length() == 1) {
                res = 0;
            } else {
                res = Math.max(-Integer.parseInt(s.substring(0, s.length() - 1)), res);
                res = Math.max(-Integer.parseInt(s.substring(0, s.length() - 2) + s.charAt(s.length() - 1)), res);
            }

            out.println(res);
        }

        out.close();
    }
}

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 nextInt() {
        return Integer.parseInt(next());
    }

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

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

class TaskA {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        String n = in.nextLine();

        int a = Integer.parseInt(n);
        int b = Integer.parseInt(n.substring(0, n.length() - 1));
        int c = Integer.parseInt(n.substring(0, n.length() - 2) + n.charAt(n.length() - 1));

        out.println(Math.max(a, Math.max(b, c)));
    }
}