import java.util.*;
public class Main {

    
    public static void main(String[] args) {
     
        Scanner entrada=new Scanner(System.in);
       int x[]=new int[2];
       int x2[]=new int[3];
       
        for (int i = 0; i < 2; i++) {
            x[i]=entrada.nextInt();
     }
      
       x2[0]=x[0]+x[0]-1;
       x2[1]=x[0]+x[1];
       x2[2]=x[1]+x[1]-1;
       
      Arrays.sort(x2);
        System.out.println(x2[2]);
    }
    
} import java.util.*; util.* java public class Main {

    
    public static void main(String[] args) {
     
        Scanner entrada=new Scanner(System.in);
       int x[]=new int[2];
       int x2[]=new int[3];
       
        for (int i = 0; i < 2; i++) {
            x[i]=entrada.nextInt();
     }
      
       x2[0]=x[0]+x[0]-1;
       x2[1]=x[0]+x[1];
       x2[2]=x[1]+x[1]-1;
       
      Arrays.sort(x2);
        System.out.println(x2[2]);
    }
    
} Main public static void main(String[] args) {
     
        Scanner entrada=new Scanner(System.in);
       int x[]=new int[2];
       int x2[]=new int[3];
       
        for (int i = 0; i < 2; i++) {
            x[i]=entrada.nextInt();
     }
      
       x2[0]=x[0]+x[0]-1;
       x2[1]=x[0]+x[1];
       x2[2]=x[1]+x[1]-1;
       
      Arrays.sort(x2);
        System.out.println(x2[2]);
    } main {
     
        Scanner entrada=new Scanner(System.in);
       int x[]=new int[2];
       int x2[]=new int[3];
       
        for (int i = 0; i < 2; i++) {
            x[i]=entrada.nextInt();
     }
      
       x2[0]=x[0]+x[0]-1;
       x2[1]=x[0]+x[1];
       x2[2]=x[1]+x[1]-1;
       
      Arrays.sort(x2);
        System.out.println(x2[2]);
    } Scanner entrada=new Scanner(System.in); entrada new Scanner(System.in) int x[]=new int[2]; x new int[2] 2 int x2[]=new int[3]; x2 new int[3] 3 for (int i = 0; i < 2; i++) {
            x[i]=entrada.nextInt();
     } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            x[i]=entrada.nextInt();
     } {
            x[i]=entrada.nextInt();
     } x[i]=entrada.nextInt() x[i] x i entrada.nextInt() entrada.nextInt entrada x2[0]=x[0]+x[0]-1 x2[0] x2 0 x[0]+x[0]-1 x[0]+x[0] x[0] x 0 x[0] x 0 1 x2[1]=x[0]+x[1] x2[1] x2 1 x[0]+x[1] x[0] x 0 x[1] x 1 x2[2]=x[1]+x[1]-1 x2[2] x2 2 x[1]+x[1]-1 x[1]+x[1] x[1] x 1 x[1] x 1 1 Arrays.sort(x2) Arrays.sort Arrays x2 System.out.println(x2[2]) System.out.println System.out System System.out x2[2] x2 2 String[] args args public class Main {

    
    public static void main(String[] args) {
     
        Scanner entrada=new Scanner(System.in);
       int x[]=new int[2];
       int x2[]=new int[3];
       
        for (int i = 0; i < 2; i++) {
            x[i]=entrada.nextInt();
     }
      
       x2[0]=x[0]+x[0]-1;
       x2[1]=x[0]+x[1];
       x2[2]=x[1]+x[1]-1;
       
      Arrays.sort(x2);
        System.out.println(x2[2]);
    }
    
} public class Main {

    
    public static void main(String[] args) {
     
        Scanner entrada=new Scanner(System.in);
       int x[]=new int[2];
       int x2[]=new int[3];
       
        for (int i = 0; i < 2; i++) {
            x[i]=entrada.nextInt();
     }
      
       x2[0]=x[0]+x[0]-1;
       x2[1]=x[0]+x[1];
       x2[2]=x[1]+x[1]-1;
       
      Arrays.sort(x2);
        System.out.println(x2[2]);
    }
    
} Main
import java.util.*;
public class Main {

    
    public static void main(String[] args) {
     
        Scanner entrada=new Scanner(System.in);
       int x[]=new int[2];
       int x2[]=new int[3];
       
        for (int i = 0; i < 2; i++) {
            x[i]=entrada.nextInt();
     }
      
       x2[0]=x[0]+x[0]-1;
       x2[1]=x[0]+x[1];
       x2[2]=x[1]+x[1]-1;
       
      Arrays.sort(x2);
        System.out.println(x2[2]);
    }
    
}
