import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int MAX;
		if(A+B > A-B) {
			if(A+B > A*B) {
				MAX= A+B;
			} else {
				MAX = A*B;
			}
		} else {
			if(A-B > A*B) {
				MAX = A-B;
			} else {
				MAX = A*B;
			}
		}
		System.out.println(MAX);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int MAX;
		if(A+B > A-B) {
			if(A+B > A*B) {
				MAX= A+B;
			} else {
				MAX = A*B;
			}
		} else {
			if(A-B > A*B) {
				MAX = A-B;
			} else {
				MAX = A*B;
			}
		}
		System.out.println(MAX);
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int MAX;
		if(A+B > A-B) {
			if(A+B > A*B) {
				MAX= A+B;
			} else {
				MAX = A*B;
			}
		} else {
			if(A-B > A*B) {
				MAX = A-B;
			} else {
				MAX = A*B;
			}
		}
		System.out.println(MAX);
	} main {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int MAX;
		if(A+B > A-B) {
			if(A+B > A*B) {
				MAX= A+B;
			} else {
				MAX = A*B;
			}
		} else {
			if(A-B > A*B) {
				MAX = A-B;
			} else {
				MAX = A*B;
			}
		}
		System.out.println(MAX);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int A = scanner.nextInt(); A scanner.nextInt() scanner.nextInt scanner int B = scanner.nextInt(); B scanner.nextInt() scanner.nextInt scanner int MAX; MAX if(A+B > A-B) {
			if(A+B > A*B) {
				MAX= A+B;
			} else {
				MAX = A*B;
			}
		} else {
			if(A-B > A*B) {
				MAX = A-B;
			} else {
				MAX = A*B;
			}
		} A+B > A-B A+B A B A-B A B {
			if(A+B > A*B) {
				MAX= A+B;
			} else {
				MAX = A*B;
			}
		} if(A+B > A*B) {
				MAX= A+B;
			} else {
				MAX = A*B;
			} A+B > A*B A+B A B A*B A B {
				MAX= A+B;
			} MAX= A+B MAX A+B A B {
				MAX = A*B;
			} MAX = A*B MAX A*B A B {
			if(A-B > A*B) {
				MAX = A-B;
			} else {
				MAX = A*B;
			}
		} if(A-B > A*B) {
				MAX = A-B;
			} else {
				MAX = A*B;
			} A-B > A*B A-B A B A*B A B {
				MAX = A-B;
			} MAX = A-B MAX A-B A B {
				MAX = A*B;
			} MAX = A*B MAX A*B A B 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 scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int MAX;
		if(A+B > A-B) {
			if(A+B > A*B) {
				MAX= A+B;
			} else {
				MAX = A*B;
			}
		} else {
			if(A-B > A*B) {
				MAX = A-B;
			} else {
				MAX = A*B;
			}
		}
		System.out.println(MAX);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int MAX;
		if(A+B > A-B) {
			if(A+B > A*B) {
				MAX= A+B;
			} else {
				MAX = A*B;
			}
		} else {
			if(A-B > A*B) {
				MAX = A-B;
			} else {
				MAX = A*B;
			}
		}
		System.out.println(MAX);
	}
} Main
import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int MAX;
		if(A+B > A-B) {
			if(A+B > A*B) {
				MAX= A+B;
			} else {
				MAX = A*B;
			}
		} else {
			if(A-B > A*B) {
				MAX = A-B;
			} else {
				MAX = A*B;
			}
		}
		System.out.println(MAX);
	}
}