import java.util.*;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		//1行目の整数を読み込む
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		//A+B,A-B,A×Bを計算する
		int AplusB = A+B ;
		int AminusB = A-B;
		int AmultiplyB = A*B;
		
		//3つの計算結果を比較し、最大のものを変数maxに入れる
		int max;
		max = AplusB;
		
		if(AplusB < AminusB) {
			max = AminusB;
			if (AminusB < AmultiplyB) {
				max = AmultiplyB;
			}
		}else if(AplusB < AmultiplyB){
			max = AmultiplyB;
		}
		
		System.out.println(max);
			
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		//1行目の整数を読み込む
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		//A+B,A-B,A×Bを計算する
		int AplusB = A+B ;
		int AminusB = A-B;
		int AmultiplyB = A*B;
		
		//3つの計算結果を比較し、最大のものを変数maxに入れる
		int max;
		max = AplusB;
		
		if(AplusB < AminusB) {
			max = AminusB;
			if (AminusB < AmultiplyB) {
				max = AmultiplyB;
			}
		}else if(AplusB < AmultiplyB){
			max = AmultiplyB;
		}
		
		System.out.println(max);
			
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		//1行目の整数を読み込む
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		//A+B,A-B,A×Bを計算する
		int AplusB = A+B ;
		int AminusB = A-B;
		int AmultiplyB = A*B;
		
		//3つの計算結果を比較し、最大のものを変数maxに入れる
		int max;
		max = AplusB;
		
		if(AplusB < AminusB) {
			max = AminusB;
			if (AminusB < AmultiplyB) {
				max = AmultiplyB;
			}
		}else if(AplusB < AmultiplyB){
			max = AmultiplyB;
		}
		
		System.out.println(max);
			
	} main {
		Scanner sc = new Scanner(System.in);
		
		//1行目の整数を読み込む
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		//A+B,A-B,A×Bを計算する
		int AplusB = A+B ;
		int AminusB = A-B;
		int AmultiplyB = A*B;
		
		//3つの計算結果を比較し、最大のものを変数maxに入れる
		int max;
		max = AplusB;
		
		if(AplusB < AminusB) {
			max = AminusB;
			if (AminusB < AmultiplyB) {
				max = AmultiplyB;
			}
		}else if(AplusB < AmultiplyB){
			max = AmultiplyB;
		}
		
		System.out.println(max);
			
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int AplusB = A+B ; AplusB A+B A B int AminusB = A-B; AminusB A-B A B int AmultiplyB = A*B; AmultiplyB A*B A B int max; max max = AplusB max AplusB if(AplusB < AminusB) {
			max = AminusB;
			if (AminusB < AmultiplyB) {
				max = AmultiplyB;
			}
		}else if(AplusB < AmultiplyB){
			max = AmultiplyB;
		} AplusB < AminusB AplusB AminusB {
			max = AminusB;
			if (AminusB < AmultiplyB) {
				max = AmultiplyB;
			}
		} max = AminusB max AminusB if (AminusB < AmultiplyB) {
				max = AmultiplyB;
			} AminusB < AmultiplyB AminusB AmultiplyB {
				max = AmultiplyB;
			} max = AmultiplyB max AmultiplyB if(AplusB < AmultiplyB){
			max = AmultiplyB;
		} AplusB < AmultiplyB AplusB AmultiplyB {
			max = AmultiplyB;
		} max = AmultiplyB max AmultiplyB System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		//1行目の整数を読み込む
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		//A+B,A-B,A×Bを計算する
		int AplusB = A+B ;
		int AminusB = A-B;
		int AmultiplyB = A*B;
		
		//3つの計算結果を比較し、最大のものを変数maxに入れる
		int max;
		max = AplusB;
		
		if(AplusB < AminusB) {
			max = AminusB;
			if (AminusB < AmultiplyB) {
				max = AmultiplyB;
			}
		}else if(AplusB < AmultiplyB){
			max = AmultiplyB;
		}
		
		System.out.println(max);
			
	}
} public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		//1行目の整数を読み込む
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		//A+B,A-B,A×Bを計算する
		int AplusB = A+B ;
		int AminusB = A-B;
		int AmultiplyB = A*B;
		
		//3つの計算結果を比較し、最大のものを変数maxに入れる
		int max;
		max = AplusB;
		
		if(AplusB < AminusB) {
			max = AminusB;
			if (AminusB < AmultiplyB) {
				max = AmultiplyB;
			}
		}else if(AplusB < AmultiplyB){
			max = AmultiplyB;
		}
		
		System.out.println(max);
			
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		//1行目の整数を読み込む
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		//A+B,A-B,A×Bを計算する
		int AplusB = A+B ;
		int AminusB = A-B;
		int AmultiplyB = A*B;
		
		//3つの計算結果を比較し、最大のものを変数maxに入れる
		int max;
		max = AplusB;
		
		if(AplusB < AminusB) {
			max = AminusB;
			if (AminusB < AmultiplyB) {
				max = AmultiplyB;
			}
		}else if(AplusB < AmultiplyB){
			max = AmultiplyB;
		}
		
		System.out.println(max);
			
	}
}
