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();
		sc.close();

		int max = 0;
		int cnt = 0;
		for (int i = 0; i <= 1; i++) {
			if (A >= B) {
				max = A;
				A -= 1;
			} else {
				max = B;
				B -= 1;
			}
			cnt += max;
		}
		System.out.println(cnt);
	}
} 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();
		sc.close();

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

		int max = 0;
		int cnt = 0;
		for (int i = 0; i <= 1; i++) {
			if (A >= B) {
				max = A;
				A -= 1;
			} else {
				max = B;
				B -= 1;
			}
			cnt += max;
		}
		System.out.println(cnt);
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();

		int max = 0;
		int cnt = 0;
		for (int i = 0; i <= 1; i++) {
			if (A >= B) {
				max = A;
				A -= 1;
			} else {
				max = B;
				B -= 1;
			}
			cnt += max;
		}
		System.out.println(cnt);
	} 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 max = 0; max 0 int cnt = 0; cnt 0 for (int i = 0; i <= 1; i++) {
			if (A >= B) {
				max = A;
				A -= 1;
			} else {
				max = B;
				B -= 1;
			}
			cnt += max;
		} int i = 0; int i = 0; i 0 i <= 1 i 1 i++ i++ i {
			if (A >= B) {
				max = A;
				A -= 1;
			} else {
				max = B;
				B -= 1;
			}
			cnt += max;
		} {
			if (A >= B) {
				max = A;
				A -= 1;
			} else {
				max = B;
				B -= 1;
			}
			cnt += max;
		} if (A >= B) {
				max = A;
				A -= 1;
			} else {
				max = B;
				B -= 1;
			} A >= B A B {
				max = A;
				A -= 1;
			} max = A max A A -= 1 A 1 {
				max = B;
				B -= 1;
			} max = B max B B -= 1 B 1 cnt += max cnt max System.out.println(cnt) System.out.println System.out System System.out cnt 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();
		sc.close();

		int max = 0;
		int cnt = 0;
		for (int i = 0; i <= 1; i++) {
			if (A >= B) {
				max = A;
				A -= 1;
			} else {
				max = B;
				B -= 1;
			}
			cnt += max;
		}
		System.out.println(cnt);
	}
} public 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 max = 0;
		int cnt = 0;
		for (int i = 0; i <= 1; i++) {
			if (A >= B) {
				max = A;
				A -= 1;
			} else {
				max = B;
				B -= 1;
			}
			cnt += max;
		}
		System.out.println(cnt);
	}
} 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();
		sc.close();

		int max = 0;
		int cnt = 0;
		for (int i = 0; i <= 1; i++) {
			if (A >= B) {
				max = A;
				A -= 1;
			} else {
				max = B;
				B -= 1;
			}
			cnt += max;
		}
		System.out.println(cnt);
	}
}
