import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner scan=new Scanner(System.in);
    int a=scan.nextInt();
    int b=scan.nextInt();
    if(a+b>=a*b && a+b>=a-b){
      System.out.println(a+b);
    }else if(a-b>=a+b && a-b>=a*b){
      System.out.println(a-b);
    }else if(a*b>=a+b && a*b>=a-b){
      System.out.println(a*b);
    }
  }
} import java.util.*; util.* java class Main{
  public static void main(String[] args){
    Scanner scan=new Scanner(System.in);
    int a=scan.nextInt();
    int b=scan.nextInt();
    if(a+b>=a*b && a+b>=a-b){
      System.out.println(a+b);
    }else if(a-b>=a+b && a-b>=a*b){
      System.out.println(a-b);
    }else if(a*b>=a+b && a*b>=a-b){
      System.out.println(a*b);
    }
  }
} Main public static void main(String[] args){
    Scanner scan=new Scanner(System.in);
    int a=scan.nextInt();
    int b=scan.nextInt();
    if(a+b>=a*b && a+b>=a-b){
      System.out.println(a+b);
    }else if(a-b>=a+b && a-b>=a*b){
      System.out.println(a-b);
    }else if(a*b>=a+b && a*b>=a-b){
      System.out.println(a*b);
    }
  } main {
    Scanner scan=new Scanner(System.in);
    int a=scan.nextInt();
    int b=scan.nextInt();
    if(a+b>=a*b && a+b>=a-b){
      System.out.println(a+b);
    }else if(a-b>=a+b && a-b>=a*b){
      System.out.println(a-b);
    }else if(a*b>=a+b && a*b>=a-b){
      System.out.println(a*b);
    }
  } Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int a=scan.nextInt(); a scan.nextInt() scan.nextInt scan int b=scan.nextInt(); b scan.nextInt() scan.nextInt scan if(a+b>=a*b && a+b>=a-b){
      System.out.println(a+b);
    }else if(a-b>=a+b && a-b>=a*b){
      System.out.println(a-b);
    }else if(a*b>=a+b && a*b>=a-b){
      System.out.println(a*b);
    } a+b>=a*b && a+b>=a-b a+b>=a*b a+b a b a*b a b a+b>=a-b a+b a b a-b a b {
      System.out.println(a+b);
    } System.out.println(a+b) System.out.println System.out System System.out a+b a b if(a-b>=a+b && a-b>=a*b){
      System.out.println(a-b);
    }else if(a*b>=a+b && a*b>=a-b){
      System.out.println(a*b);
    } a-b>=a+b && a-b>=a*b a-b>=a+b a-b a b a+b a b a-b>=a*b a-b a b a*b a b {
      System.out.println(a-b);
    } System.out.println(a-b) System.out.println System.out System System.out a-b a b if(a*b>=a+b && a*b>=a-b){
      System.out.println(a*b);
    } a*b>=a+b && a*b>=a-b a*b>=a+b a*b a b a+b a b a*b>=a-b a*b a b a-b a b {
      System.out.println(a*b);
    } System.out.println(a*b) System.out.println System.out System System.out a*b a b String[] args args
import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner scan=new Scanner(System.in);
    int a=scan.nextInt();
    int b=scan.nextInt();
    if(a+b>=a*b && a+b>=a-b){
      System.out.println(a+b);
    }else if(a-b>=a+b && a-b>=a*b){
      System.out.println(a-b);
    }else if(a*b>=a+b && a*b>=a-b){
      System.out.println(a*b);
    }
  }
}