import java.util.*;

public class Main {
  
 	public static void main(String[] args) {
     
      Scanner sc = new Scanner(System.in);
	  int n = Integer.parseInt(sc.next());
      int m = Integer.parseInt(sc.next());
      
      int max = m*n;
      
      if(max < m+n) {
        max = m+n;
      }
      
      if(max < n-m) {
        max = n-m;
      }
      
      System.out.println(max);
    }
  
} import java.util.*; util.* java public class Main {
  
 	public static void main(String[] args) {
     
      Scanner sc = new Scanner(System.in);
	  int n = Integer.parseInt(sc.next());
      int m = Integer.parseInt(sc.next());
      
      int max = m*n;
      
      if(max < m+n) {
        max = m+n;
      }
      
      if(max < n-m) {
        max = n-m;
      }
      
      System.out.println(max);
    }
  
} Main public static void main(String[] args) {
     
      Scanner sc = new Scanner(System.in);
	  int n = Integer.parseInt(sc.next());
      int m = Integer.parseInt(sc.next());
      
      int max = m*n;
      
      if(max < m+n) {
        max = m+n;
      }
      
      if(max < n-m) {
        max = n-m;
      }
      
      System.out.println(max);
    } main {
     
      Scanner sc = new Scanner(System.in);
	  int n = Integer.parseInt(sc.next());
      int m = Integer.parseInt(sc.next());
      
      int max = m*n;
      
      if(max < m+n) {
        max = m+n;
      }
      
      if(max < n-m) {
        max = n-m;
      }
      
      System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int m = Integer.parseInt(sc.next()); m Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int max = m*n; max m*n m n if(max < m+n) {
        max = m+n;
      } max < m+n max m+n m n {
        max = m+n;
      } max = m+n max m+n m n if(max < n-m) {
        max = n-m;
      } max < n-m max n-m n m {
        max = n-m;
      } max = n-m max n-m n m 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);
	  int n = Integer.parseInt(sc.next());
      int m = Integer.parseInt(sc.next());
      
      int max = m*n;
      
      if(max < m+n) {
        max = m+n;
      }
      
      if(max < n-m) {
        max = n-m;
      }
      
      System.out.println(max);
    }
  
} public class Main {
  
 	public static void main(String[] args) {
     
      Scanner sc = new Scanner(System.in);
	  int n = Integer.parseInt(sc.next());
      int m = Integer.parseInt(sc.next());
      
      int max = m*n;
      
      if(max < m+n) {
        max = m+n;
      }
      
      if(max < n-m) {
        max = n-m;
      }
      
      System.out.println(max);
    }
  
} Main
import java.util.*;

public class Main {
  
 	public static void main(String[] args) {
     
      Scanner sc = new Scanner(System.in);
	  int n = Integer.parseInt(sc.next());
      int m = Integer.parseInt(sc.next());
      
      int max = m*n;
      
      if(max < m+n) {
        max = m+n;
      }
      
      if(max < n-m) {
        max = n-m;
      }
      
      System.out.println(max);
    }
  
}