import java.util.Scanner;

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

		int answer =0;

		a[0] = A + (A-1);
		a[1] = A + B;
		a[2] = B + B-1;
		for (int i=0; i<3; i++) {
			answer = Math.max(answer, a[i]);
		}
		System.out.print(answer);
	}

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

		int answer =0;

		a[0] = A + (A-1);
		a[1] = A + B;
		a[2] = B + B-1;
		for (int i=0; i<3; i++) {
			answer = Math.max(answer, a[i]);
		}
		System.out.print(answer);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] a =new int[3];
		int A = sc.nextInt();
		int B = sc.nextInt();

		int answer =0;

		a[0] = A + (A-1);
		a[1] = A + B;
		a[2] = B + B-1;
		for (int i=0; i<3; i++) {
			answer = Math.max(answer, a[i]);
		}
		System.out.print(answer);
	} main {
		Scanner sc = new Scanner(System.in);
		int[] a =new int[3];
		int A = sc.nextInt();
		int B = sc.nextInt();

		int answer =0;

		a[0] = A + (A-1);
		a[1] = A + B;
		a[2] = B + B-1;
		for (int i=0; i<3; i++) {
			answer = Math.max(answer, a[i]);
		}
		System.out.print(answer);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] a =new int[3]; a new int[3] 3 int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int answer =0; answer 0 a[0] = A + (A-1) a[0] a 0 A + (A-1) A (A-1) A 1 a[1] = A + B a[1] a 1 A + B A B a[2] = B + B-1 a[2] a 2 B + B-1 B + B B B 1 for (int i=0; i<3; i++) {
			answer = Math.max(answer, a[i]);
		} int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
			answer = Math.max(answer, a[i]);
		} {
			answer = Math.max(answer, a[i]);
		} answer = Math.max(answer, a[i]) answer Math.max(answer, a[i]) Math.max Math answer a[i] a i System.out.print(answer) System.out.print System.out System System.out answer String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] a =new int[3];
		int A = sc.nextInt();
		int B = sc.nextInt();

		int answer =0;

		a[0] = A + (A-1);
		a[1] = A + B;
		a[2] = B + B-1;
		for (int i=0; i<3; i++) {
			answer = Math.max(answer, a[i]);
		}
		System.out.print(answer);
	}

} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] a =new int[3];
		int A = sc.nextInt();
		int B = sc.nextInt();

		int answer =0;

		a[0] = A + (A-1);
		a[1] = A + B;
		a[2] = B + B-1;
		for (int i=0; i<3; i++) {
			answer = Math.max(answer, a[i]);
		}
		System.out.print(answer);
	}

} Main
import java.util.Scanner;

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

		int answer =0;

		a[0] = A + (A-1);
		a[1] = A + B;
		a[2] = B + B-1;
		for (int i=0; i<3; i++) {
			answer = Math.max(answer, a[i]);
		}
		System.out.print(answer);
	}

}
