import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();
		int C = A - 1;
		int D = B - 1;

		int sum = +0;
		if (A < B) {
			sum += B;
			if (A < D) {
				sum += D;
			} else {
				sum += A;
			}
		} else {
			sum += A;
			if (B < C) {
				sum += C;
			} else {
				sum += B;
			}
		}
		System.out.println(sum);
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();
		int C = A - 1;
		int D = B - 1;

		int sum = +0;
		if (A < B) {
			sum += B;
			if (A < D) {
				sum += D;
			} else {
				sum += A;
			}
		} else {
			sum += A;
			if (B < C) {
				sum += C;
			} else {
				sum += B;
			}
		}
		System.out.println(sum);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();
		int C = A - 1;
		int D = B - 1;

		int sum = +0;
		if (A < B) {
			sum += B;
			if (A < D) {
				sum += D;
			} else {
				sum += A;
			}
		} else {
			sum += A;
			if (B < C) {
				sum += C;
			} else {
				sum += B;
			}
		}
		System.out.println(sum);
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();
		int C = A - 1;
		int D = B - 1;

		int sum = +0;
		if (A < B) {
			sum += B;
			if (A < D) {
				sum += D;
			} else {
				sum += A;
			}
		} else {
			sum += A;
			if (B < C) {
				sum += C;
			} else {
				sum += B;
			}
		}
		System.out.println(sum);
	} 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 sc.close() sc.close sc int C = A - 1; C A - 1 A 1 int D = B - 1; D B - 1 B 1 int sum = +0; sum +0 0 if (A < B) {
			sum += B;
			if (A < D) {
				sum += D;
			} else {
				sum += A;
			}
		} else {
			sum += A;
			if (B < C) {
				sum += C;
			} else {
				sum += B;
			}
		} A < B A B {
			sum += B;
			if (A < D) {
				sum += D;
			} else {
				sum += A;
			}
		} sum += B sum B if (A < D) {
				sum += D;
			} else {
				sum += A;
			} A < D A D {
				sum += D;
			} sum += D sum D {
				sum += A;
			} sum += A sum A {
			sum += A;
			if (B < C) {
				sum += C;
			} else {
				sum += B;
			}
		} sum += A sum A if (B < C) {
				sum += C;
			} else {
				sum += B;
			} B < C B C {
				sum += C;
			} sum += C sum C {
				sum += B;
			} sum += B sum B System.out.println(sum) System.out.println System.out System System.out sum String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();
		int C = A - 1;
		int D = B - 1;

		int sum = +0;
		if (A < B) {
			sum += B;
			if (A < D) {
				sum += D;
			} else {
				sum += A;
			}
		} else {
			sum += A;
			if (B < C) {
				sum += C;
			} else {
				sum += B;
			}
		}
		System.out.println(sum);
	}
}
