import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input1 = scanner.next();
		String input2 = scanner.next();
		scanner.close();

		int A = Integer.valueOf(input1);
		int B = Integer.valueOf(input2);

		// 対称性によりAが大きい方とする
		if(A < B) {
			int tmp = A;
			A = B;
			B = tmp;
		}
		// 2つめはどっちかなのでこれで決まる
		int result1 = A + A - 1;
		int result2 = A + B;
		if(result1 >= result2) {
			System.out.println(result1);
		} else {
			System.out.println(result2);
		}
	}

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

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input1 = scanner.next();
		String input2 = scanner.next();
		scanner.close();

		int A = Integer.valueOf(input1);
		int B = Integer.valueOf(input2);

		// 対称性によりAが大きい方とする
		if(A < B) {
			int tmp = A;
			A = B;
			B = tmp;
		}
		// 2つめはどっちかなのでこれで決まる
		int result1 = A + A - 1;
		int result2 = A + B;
		if(result1 >= result2) {
			System.out.println(result1);
		} else {
			System.out.println(result2);
		}
	}

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

		int A = Integer.valueOf(input1);
		int B = Integer.valueOf(input2);

		// 対称性によりAが大きい方とする
		if(A < B) {
			int tmp = A;
			A = B;
			B = tmp;
		}
		// 2つめはどっちかなのでこれで決まる
		int result1 = A + A - 1;
		int result2 = A + B;
		if(result1 >= result2) {
			System.out.println(result1);
		} else {
			System.out.println(result2);
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		String input1 = scanner.next();
		String input2 = scanner.next();
		scanner.close();

		int A = Integer.valueOf(input1);
		int B = Integer.valueOf(input2);

		// 対称性によりAが大きい方とする
		if(A < B) {
			int tmp = A;
			A = B;
			B = tmp;
		}
		// 2つめはどっちかなのでこれで決まる
		int result1 = A + A - 1;
		int result2 = A + B;
		if(result1 >= result2) {
			System.out.println(result1);
		} else {
			System.out.println(result2);
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input1 = scanner.next(); input1 scanner.next() scanner.next scanner String input2 = scanner.next(); input2 scanner.next() scanner.next scanner scanner.close() scanner.close scanner int A = Integer.valueOf(input1); A Integer.valueOf(input1) Integer.valueOf Integer input1 int B = Integer.valueOf(input2); B Integer.valueOf(input2) Integer.valueOf Integer input2 if(A < B) {
			int tmp = A;
			A = B;
			B = tmp;
		} A < B A B {
			int tmp = A;
			A = B;
			B = tmp;
		} int tmp = A; tmp A A = B A B B = tmp B tmp int result1 = A + A - 1; result1 A + A - 1 A + A A A 1 int result2 = A + B; result2 A + B A B if(result1 >= result2) {
			System.out.println(result1);
		} else {
			System.out.println(result2);
		} result1 >= result2 result1 result2 {
			System.out.println(result1);
		} System.out.println(result1) System.out.println System.out System System.out result1 {
			System.out.println(result2);
		} System.out.println(result2) System.out.println System.out System System.out result2 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input1 = scanner.next();
		String input2 = scanner.next();
		scanner.close();

		int A = Integer.valueOf(input1);
		int B = Integer.valueOf(input2);

		// 対称性によりAが大きい方とする
		if(A < B) {
			int tmp = A;
			A = B;
			B = tmp;
		}
		// 2つめはどっちかなのでこれで決まる
		int result1 = A + A - 1;
		int result2 = A + B;
		if(result1 >= result2) {
			System.out.println(result1);
		} else {
			System.out.println(result2);
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input1 = scanner.next();
		String input2 = scanner.next();
		scanner.close();

		int A = Integer.valueOf(input1);
		int B = Integer.valueOf(input2);

		// 対称性によりAが大きい方とする
		if(A < B) {
			int tmp = A;
			A = B;
			B = tmp;
		}
		// 2つめはどっちかなのでこれで決まる
		int result1 = A + A - 1;
		int result2 = A + B;
		if(result1 >= result2) {
			System.out.println(result1);
		} else {
			System.out.println(result2);
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input1 = scanner.next();
		String input2 = scanner.next();
		scanner.close();

		int A = Integer.valueOf(input1);
		int B = Integer.valueOf(input2);

		// 対称性によりAが大きい方とする
		if(A < B) {
			int tmp = A;
			A = B;
			B = tmp;
		}
		// 2つめはどっちかなのでこれで決まる
		int result1 = A + A - 1;
		int result2 = A + B;
		if(result1 >= result2) {
			System.out.println(result1);
		} else {
			System.out.println(result2);
		}
	}

}
