import java.util.Scanner;

public class Main {
	
	public static int max(int A, int B) {
		int ans = A;

		if (B > ans) {
			ans = B;
			B--;
		} else {
			A--;
		}

		if (A >= B) {
			ans += A;
		} else {
			ans += B;
		}
		return ans;
	}
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int ans = max(A, B);
		System.out.println(ans);
		scanner.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	
	public static int max(int A, int B) {
		int ans = A;

		if (B > ans) {
			ans = B;
			B--;
		} else {
			A--;
		}

		if (A >= B) {
			ans += A;
		} else {
			ans += B;
		}
		return ans;
	}
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int ans = max(A, B);
		System.out.println(ans);
		scanner.close();
	}
} Main public static int max(int A, int B) {
		int ans = A;

		if (B > ans) {
			ans = B;
			B--;
		} else {
			A--;
		}

		if (A >= B) {
			ans += A;
		} else {
			ans += B;
		}
		return ans;
	} max {
		int ans = A;

		if (B > ans) {
			ans = B;
			B--;
		} else {
			A--;
		}

		if (A >= B) {
			ans += A;
		} else {
			ans += B;
		}
		return ans;
	} int ans = A; ans A if (B > ans) {
			ans = B;
			B--;
		} else {
			A--;
		} B > ans B ans {
			ans = B;
			B--;
		} ans = B ans B B-- B {
			A--;
		} A-- A if (A >= B) {
			ans += A;
		} else {
			ans += B;
		} A >= B A B {
			ans += A;
		} ans += A ans A {
			ans += B;
		} ans += B ans B return ans; ans int A A int B B public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int ans = max(A, B);
		System.out.println(ans);
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int ans = max(A, B);
		System.out.println(ans);
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int A = scanner.nextInt(); A scanner.nextInt() scanner.nextInt scanner int B = scanner.nextInt(); B scanner.nextInt() scanner.nextInt scanner int ans = max(A, B); ans max(A, B) max A B System.out.println(ans) System.out.println System.out System System.out ans scanner.close() scanner.close scanner String[] args args public class Main {
	
	public static int max(int A, int B) {
		int ans = A;

		if (B > ans) {
			ans = B;
			B--;
		} else {
			A--;
		}

		if (A >= B) {
			ans += A;
		} else {
			ans += B;
		}
		return ans;
	}
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int ans = max(A, B);
		System.out.println(ans);
		scanner.close();
	}
} public class Main {
	
	public static int max(int A, int B) {
		int ans = A;

		if (B > ans) {
			ans = B;
			B--;
		} else {
			A--;
		}

		if (A >= B) {
			ans += A;
		} else {
			ans += B;
		}
		return ans;
	}
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int ans = max(A, B);
		System.out.println(ans);
		scanner.close();
	}
} Main
import java.util.Scanner;

public class Main {
	
	public static int max(int A, int B) {
		int ans = A;

		if (B > ans) {
			ans = B;
			B--;
		} else {
			A--;
		}

		if (A >= B) {
			ans += A;
		} else {
			ans += B;
		}
		return ans;
	}
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int ans = max(A, B);
		System.out.println(ans);
		scanner.close();
	}
}
