import java.util.Scanner;

class Main {

	private static int a,b;

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		a = scanner.nextInt();
		b = scanner.nextInt();
		scanner.close();

		int ret = 0;
		ret += pressButton();
		ret += pressButton();

		System.out.println(ret);
	}

	private static int pressButton() {
		if(a>b) {
			a--;
			return a+1;
		}else {
			b--;
			return b+1;
		}
	}

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

	private static int a,b;

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		a = scanner.nextInt();
		b = scanner.nextInt();
		scanner.close();

		int ret = 0;
		ret += pressButton();
		ret += pressButton();

		System.out.println(ret);
	}

	private static int pressButton() {
		if(a>b) {
			a--;
			return a+1;
		}else {
			b--;
			return b+1;
		}
	}

} Main private static int a a b; b public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		a = scanner.nextInt();
		b = scanner.nextInt();
		scanner.close();

		int ret = 0;
		ret += pressButton();
		ret += pressButton();

		System.out.println(ret);
	} main {
		Scanner scanner = new Scanner(System.in);
		a = scanner.nextInt();
		b = scanner.nextInt();
		scanner.close();

		int ret = 0;
		ret += pressButton();
		ret += pressButton();

		System.out.println(ret);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) a = scanner.nextInt() a scanner.nextInt() scanner.nextInt scanner b = scanner.nextInt() b scanner.nextInt() scanner.nextInt scanner scanner.close() scanner.close scanner int ret = 0; ret 0 ret += pressButton() ret pressButton() pressButton ret += pressButton() ret pressButton() pressButton System.out.println(ret) System.out.println System.out System System.out ret String[] args args private static int pressButton() {
		if(a>b) {
			a--;
			return a+1;
		}else {
			b--;
			return b+1;
		}
	} pressButton {
		if(a>b) {
			a--;
			return a+1;
		}else {
			b--;
			return b+1;
		}
	} if(a>b) {
			a--;
			return a+1;
		}else {
			b--;
			return b+1;
		} a>b a b {
			a--;
			return a+1;
		} a-- a return a+1; a+1 a 1 {
			b--;
			return b+1;
		} b-- b return b+1; b+1 b 1
import java.util.Scanner;

class Main {

	private static int a,b;

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		a = scanner.nextInt();
		b = scanner.nextInt();
		scanner.close();

		int ret = 0;
		ret += pressButton();
		ret += pressButton();

		System.out.println(ret);
	}

	private static int pressButton() {
		if(a>b) {
			a--;
			return a+1;
		}else {
			b--;
			return b+1;
		}
	}

}
