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();
		int buttons[] = new int[2];
		int maxCoins = 0;

		for (int i = 0; i < 2; i++) {
			buttons[0] = a;
			buttons[1] = b;

			int getCoins1 = buttons[i]--;
			int getCoins2 = 0;

			for (int j = 0; j < 2; j++) {
				if (buttons[j] > getCoins2) {
					getCoins2 = buttons[j];
				}
			}

			if (getCoins1 + getCoins2 > maxCoins) {
				maxCoins = getCoins1 + getCoins2;
			}
		}

		System.out.println(maxCoins);

		sc.close();
	}
} 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();
		int buttons[] = new int[2];
		int maxCoins = 0;

		for (int i = 0; i < 2; i++) {
			buttons[0] = a;
			buttons[1] = b;

			int getCoins1 = buttons[i]--;
			int getCoins2 = 0;

			for (int j = 0; j < 2; j++) {
				if (buttons[j] > getCoins2) {
					getCoins2 = buttons[j];
				}
			}

			if (getCoins1 + getCoins2 > maxCoins) {
				maxCoins = getCoins1 + getCoins2;
			}
		}

		System.out.println(maxCoins);

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int buttons[] = new int[2];
		int maxCoins = 0;

		for (int i = 0; i < 2; i++) {
			buttons[0] = a;
			buttons[1] = b;

			int getCoins1 = buttons[i]--;
			int getCoins2 = 0;

			for (int j = 0; j < 2; j++) {
				if (buttons[j] > getCoins2) {
					getCoins2 = buttons[j];
				}
			}

			if (getCoins1 + getCoins2 > maxCoins) {
				maxCoins = getCoins1 + getCoins2;
			}
		}

		System.out.println(maxCoins);

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int buttons[] = new int[2];
		int maxCoins = 0;

		for (int i = 0; i < 2; i++) {
			buttons[0] = a;
			buttons[1] = b;

			int getCoins1 = buttons[i]--;
			int getCoins2 = 0;

			for (int j = 0; j < 2; j++) {
				if (buttons[j] > getCoins2) {
					getCoins2 = buttons[j];
				}
			}

			if (getCoins1 + getCoins2 > maxCoins) {
				maxCoins = getCoins1 + getCoins2;
			}
		}

		System.out.println(maxCoins);

		sc.close();
	} 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 buttons[] = new int[2]; buttons new int[2] 2 int maxCoins = 0; maxCoins 0 for (int i = 0; i < 2; i++) {
			buttons[0] = a;
			buttons[1] = b;

			int getCoins1 = buttons[i]--;
			int getCoins2 = 0;

			for (int j = 0; j < 2; j++) {
				if (buttons[j] > getCoins2) {
					getCoins2 = buttons[j];
				}
			}

			if (getCoins1 + getCoins2 > maxCoins) {
				maxCoins = getCoins1 + getCoins2;
			}
		} int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
			buttons[0] = a;
			buttons[1] = b;

			int getCoins1 = buttons[i]--;
			int getCoins2 = 0;

			for (int j = 0; j < 2; j++) {
				if (buttons[j] > getCoins2) {
					getCoins2 = buttons[j];
				}
			}

			if (getCoins1 + getCoins2 > maxCoins) {
				maxCoins = getCoins1 + getCoins2;
			}
		} {
			buttons[0] = a;
			buttons[1] = b;

			int getCoins1 = buttons[i]--;
			int getCoins2 = 0;

			for (int j = 0; j < 2; j++) {
				if (buttons[j] > getCoins2) {
					getCoins2 = buttons[j];
				}
			}

			if (getCoins1 + getCoins2 > maxCoins) {
				maxCoins = getCoins1 + getCoins2;
			}
		} buttons[0] = a buttons[0] buttons 0 a buttons[1] = b buttons[1] buttons 1 b int getCoins1 = buttons[i]--; getCoins1 buttons[i]-- buttons[i] buttons i int getCoins2 = 0; getCoins2 0 for (int j = 0; j < 2; j++) {
				if (buttons[j] > getCoins2) {
					getCoins2 = buttons[j];
				}
			} int j = 0; int j = 0; j 0 j < 2 j 2 j++ j++ j {
				if (buttons[j] > getCoins2) {
					getCoins2 = buttons[j];
				}
			} {
				if (buttons[j] > getCoins2) {
					getCoins2 = buttons[j];
				}
			} if (buttons[j] > getCoins2) {
					getCoins2 = buttons[j];
				} buttons[j] > getCoins2 buttons[j] buttons j getCoins2 {
					getCoins2 = buttons[j];
				} getCoins2 = buttons[j] getCoins2 buttons[j] buttons j if (getCoins1 + getCoins2 > maxCoins) {
				maxCoins = getCoins1 + getCoins2;
			} getCoins1 + getCoins2 > maxCoins getCoins1 + getCoins2 getCoins1 getCoins2 maxCoins {
				maxCoins = getCoins1 + getCoins2;
			} maxCoins = getCoins1 + getCoins2 maxCoins getCoins1 + getCoins2 getCoins1 getCoins2 System.out.println(maxCoins) System.out.println System.out System System.out maxCoins sc.close() sc.close sc 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();
		int buttons[] = new int[2];
		int maxCoins = 0;

		for (int i = 0; i < 2; i++) {
			buttons[0] = a;
			buttons[1] = b;

			int getCoins1 = buttons[i]--;
			int getCoins2 = 0;

			for (int j = 0; j < 2; j++) {
				if (buttons[j] > getCoins2) {
					getCoins2 = buttons[j];
				}
			}

			if (getCoins1 + getCoins2 > maxCoins) {
				maxCoins = getCoins1 + getCoins2;
			}
		}

		System.out.println(maxCoins);

		sc.close();
	}
}
