import java.util.*;

public class Main {
  public static void main(String[] args) throws Exception{
    
    Scanner sc = new Scanner(System.in);
    
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int x = 2 * A -1;
    int y = 2 * B -1;
    int z = A + B;
    
    System.out.println(Math.max(z,Math.max(x,y)));
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) throws Exception{
    
    Scanner sc = new Scanner(System.in);
    
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int x = 2 * A -1;
    int y = 2 * B -1;
    int z = A + B;
    
    System.out.println(Math.max(z,Math.max(x,y)));
  }
} Main public static void main(String[] args) throws Exception{
    
    Scanner sc = new Scanner(System.in);
    
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int x = 2 * A -1;
    int y = 2 * B -1;
    int z = A + B;
    
    System.out.println(Math.max(z,Math.max(x,y)));
  } main {
    
    Scanner sc = new Scanner(System.in);
    
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int x = 2 * A -1;
    int y = 2 * B -1;
    int z = A + B;
    
    System.out.println(Math.max(z,Math.max(x,y)));
  } 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 x = 2 * A -1; x 2 * A -1 2 * A 2 A 1 int y = 2 * B -1; y 2 * B -1 2 * B 2 B 1 int z = A + B; z A + B A B System.out.println(Math.max(z,Math.max(x,y))) System.out.println System.out System System.out Math.max(z,Math.max(x,y)) Math.max Math z Math.max(x,y) Math.max Math x y String[] args args public class Main {
  public static void main(String[] args) throws Exception{
    
    Scanner sc = new Scanner(System.in);
    
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int x = 2 * A -1;
    int y = 2 * B -1;
    int z = A + B;
    
    System.out.println(Math.max(z,Math.max(x,y)));
  }
} public class Main {
  public static void main(String[] args) throws Exception{
    
    Scanner sc = new Scanner(System.in);
    
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int x = 2 * A -1;
    int y = 2 * B -1;
    int z = A + B;
    
    System.out.println(Math.max(z,Math.max(x,y)));
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) throws Exception{
    
    Scanner sc = new Scanner(System.in);
    
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int x = 2 * A -1;
    int y = 2 * B -1;
    int z = A + B;
    
    System.out.println(Math.max(z,Math.max(x,y)));
  }
}