import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int Anext = A - 1;
		int Bnext = B - 1;

		int arr[] = new int[]{A, B, Anext, Bnext};
		Arrays.sort(arr);

		System.out.println(arr[3] + arr[2]);
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner 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();
		int Anext = A - 1;
		int Bnext = B - 1;

		int arr[] = new int[]{A, B, Anext, Bnext};
		Arrays.sort(arr);

		System.out.println(arr[3] + arr[2]);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int Anext = A - 1;
		int Bnext = B - 1;

		int arr[] = new int[]{A, B, Anext, Bnext};
		Arrays.sort(arr);

		System.out.println(arr[3] + arr[2]);
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int Anext = A - 1;
		int Bnext = B - 1;

		int arr[] = new int[]{A, B, Anext, Bnext};
		Arrays.sort(arr);

		System.out.println(arr[3] + arr[2]);
	} 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 Anext = A - 1; Anext A - 1 A 1 int Bnext = B - 1; Bnext B - 1 B 1 int arr[] = new int[]{A, B, Anext, Bnext}; arr new int[]{A, B, Anext, Bnext} Arrays.sort(arr) Arrays.sort Arrays arr System.out.println(arr[3] + arr[2]) System.out.println System.out System System.out arr[3] + arr[2] arr[3] arr 3 arr[2] arr 2 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();
		int Anext = A - 1;
		int Bnext = B - 1;

		int arr[] = new int[]{A, B, Anext, Bnext};
		Arrays.sort(arr);

		System.out.println(arr[3] + arr[2]);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int Anext = A - 1;
		int Bnext = B - 1;

		int arr[] = new int[]{A, B, Anext, Bnext};
		Arrays.sort(arr);

		System.out.println(arr[3] + arr[2]);
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int Anext = A - 1;
		int Bnext = B - 1;

		int arr[] = new int[]{A, B, Anext, Bnext};
		Arrays.sort(arr);

		System.out.println(arr[3] + arr[2]);
	}
}
