import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();

    int[] num;
    num = new int[3];
    num[0] = A+B ;
    num[1] = 2*A-1 ;
    num[2] = 2*B-1 ;

    int max = 0;
    for(int i = 0; i < num.length ; i++) {
        if(max < num[i]) {
            max = num[i];
        }
    }
    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 A = sc.nextInt();
    int B = sc.nextInt();

    int[] num;
    num = new int[3];
    num[0] = A+B ;
    num[1] = 2*A-1 ;
    num[2] = 2*B-1 ;

    int max = 0;
    for(int i = 0; i < num.length ; i++) {
        if(max < num[i]) {
            max = num[i];
        }
    }
    System.out.println(max);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();

    int[] num;
    num = new int[3];
    num[0] = A+B ;
    num[1] = 2*A-1 ;
    num[2] = 2*B-1 ;

    int max = 0;
    for(int i = 0; i < num.length ; i++) {
        if(max < num[i]) {
            max = num[i];
        }
    }
    System.out.println(max);
  } main {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();

    int[] num;
    num = new int[3];
    num[0] = A+B ;
    num[1] = 2*A-1 ;
    num[2] = 2*B-1 ;

    int max = 0;
    for(int i = 0; i < num.length ; i++) {
        if(max < num[i]) {
            max = num[i];
        }
    }
    System.out.println(max);
  } 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[] num; num num = new int[3] num new int[3] 3 num[0] = A+B num[0] num 0 A+B A B num[1] = 2*A-1 num[1] num 1 2*A-1 2*A 2 A 1 num[2] = 2*B-1 num[2] num 2 2*B-1 2*B 2 B 1 int max = 0; max 0 for(int i = 0; i < num.length ; i++) {
        if(max < num[i]) {
            max = num[i];
        }
    } int i = 0; int i = 0; i 0 i < num.length i num.length num num.length i++ i++ i {
        if(max < num[i]) {
            max = num[i];
        }
    } {
        if(max < num[i]) {
            max = num[i];
        }
    } if(max < num[i]) {
            max = num[i];
        } max < num[i] max num[i] num i {
            max = num[i];
        } max = num[i] max num[i] num i 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 A = sc.nextInt();
    int B = sc.nextInt();

    int[] num;
    num = new int[3];
    num[0] = A+B ;
    num[1] = 2*A-1 ;
    num[2] = 2*B-1 ;

    int max = 0;
    for(int i = 0; i < num.length ; i++) {
        if(max < num[i]) {
            max = num[i];
        }
    }
    System.out.println(max);
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();

    int[] num;
    num = new int[3];
    num[0] = A+B ;
    num[1] = 2*A-1 ;
    num[2] = 2*B-1 ;

    int max = 0;
    for(int i = 0; i < num.length ; i++) {
        if(max < num[i]) {
            max = num[i];
        }
    }
    System.out.println(max);
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();

    int[] num;
    num = new int[3];
    num[0] = A+B ;
    num[1] = 2*A-1 ;
    num[2] = 2*B-1 ;

    int max = 0;
    for(int i = 0; i < num.length ; i++) {
        if(max < num[i]) {
            max = num[i];
        }
    }
    System.out.println(max);
  }
}