import java.util.Arrays;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc =new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		int Twice1 = (A+(A-1));
		int Twice2 = (B+(B-1));
		int Both = A+B;
		
		int[]Array = new int[3];
		Array[0] = Twice1;
		Array[1] = Twice2;
		Array[2] = Both;
		
		Arrays.sort(Array);
		System.out.println(Array[2]);
	}

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc =new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		int Twice1 = (A+(A-1));
		int Twice2 = (B+(B-1));
		int Both = A+B;
		
		int[]Array = new int[3];
		Array[0] = Twice1;
		Array[1] = Twice2;
		Array[2] = Both;
		
		Arrays.sort(Array);
		System.out.println(Array[2]);
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc =new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		int Twice1 = (A+(A-1));
		int Twice2 = (B+(B-1));
		int Both = A+B;
		
		int[]Array = new int[3];
		Array[0] = Twice1;
		Array[1] = Twice2;
		Array[2] = Both;
		
		Arrays.sort(Array);
		System.out.println(Array[2]);
	} main {
		// TODO Auto-generated method stub
		Scanner sc =new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		int Twice1 = (A+(A-1));
		int Twice2 = (B+(B-1));
		int Both = A+B;
		
		int[]Array = new int[3];
		Array[0] = Twice1;
		Array[1] = Twice2;
		Array[2] = Both;
		
		Arrays.sort(Array);
		System.out.println(Array[2]);
	} 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 Twice1 = (A+(A-1)); Twice1 (A+(A-1)) A (A-1) A 1 int Twice2 = (B+(B-1)); Twice2 (B+(B-1)) B (B-1) B 1 int Both = A+B; Both A+B A B int[]Array = new int[3]; Array new int[3] 3 Array[0] = Twice1 Array[0] Array 0 Twice1 Array[1] = Twice2 Array[1] Array 1 Twice2 Array[2] = Both Array[2] Array 2 Both Arrays.sort(Array) Arrays.sort Arrays Array System.out.println(Array[2]) System.out.println System.out System System.out Array[2] Array 2 String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc =new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		int Twice1 = (A+(A-1));
		int Twice2 = (B+(B-1));
		int Both = A+B;
		
		int[]Array = new int[3];
		Array[0] = Twice1;
		Array[1] = Twice2;
		Array[2] = Both;
		
		Arrays.sort(Array);
		System.out.println(Array[2]);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc =new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		int Twice1 = (A+(A-1));
		int Twice2 = (B+(B-1));
		int Both = A+B;
		
		int[]Array = new int[3];
		Array[0] = Twice1;
		Array[1] = Twice2;
		Array[2] = Both;
		
		Arrays.sort(Array);
		System.out.println(Array[2]);
	}

} Main
import java.util.Arrays;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc =new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		int Twice1 = (A+(A-1));
		int Twice2 = (B+(B-1));
		int Both = A+B;
		
		int[]Array = new int[3];
		Array[0] = Twice1;
		Array[1] = Twice2;
		Array[2] = Both;
		
		Arrays.sort(Array);
		System.out.println(Array[2]);
	}

}
