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

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

		int AB[] = new int[2];

		for (int i = 0; i < 2; i++) {
			AB[i] = sc.nextInt();
		}

		Arrays.sort(AB);

		int s = 0;

		for (int i = 0; i < 2; i++) {
			s += AB[1];
			AB[1]--;
			Arrays.sort(AB);
		}
		System.out.println(s);
	}
} 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 AB[] = new int[2];

		for (int i = 0; i < 2; i++) {
			AB[i] = sc.nextInt();
		}

		Arrays.sort(AB);

		int s = 0;

		for (int i = 0; i < 2; i++) {
			s += AB[1];
			AB[1]--;
			Arrays.sort(AB);
		}
		System.out.println(s);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int AB[] = new int[2];

		for (int i = 0; i < 2; i++) {
			AB[i] = sc.nextInt();
		}

		Arrays.sort(AB);

		int s = 0;

		for (int i = 0; i < 2; i++) {
			s += AB[1];
			AB[1]--;
			Arrays.sort(AB);
		}
		System.out.println(s);
	} main {
		Scanner sc = new Scanner(System.in);

		int AB[] = new int[2];

		for (int i = 0; i < 2; i++) {
			AB[i] = sc.nextInt();
		}

		Arrays.sort(AB);

		int s = 0;

		for (int i = 0; i < 2; i++) {
			s += AB[1];
			AB[1]--;
			Arrays.sort(AB);
		}
		System.out.println(s);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int AB[] = new int[2]; AB new int[2] 2 for (int i = 0; i < 2; i++) {
			AB[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
			AB[i] = sc.nextInt();
		} {
			AB[i] = sc.nextInt();
		} AB[i] = sc.nextInt() AB[i] AB i sc.nextInt() sc.nextInt sc Arrays.sort(AB) Arrays.sort Arrays AB int s = 0; s 0 for (int i = 0; i < 2; i++) {
			s += AB[1];
			AB[1]--;
			Arrays.sort(AB);
		} int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
			s += AB[1];
			AB[1]--;
			Arrays.sort(AB);
		} {
			s += AB[1];
			AB[1]--;
			Arrays.sort(AB);
		} s += AB[1] s AB[1] AB 1 AB[1]-- AB[1] AB 1 Arrays.sort(AB) Arrays.sort Arrays AB System.out.println(s) System.out.println System.out System System.out s String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int AB[] = new int[2];

		for (int i = 0; i < 2; i++) {
			AB[i] = sc.nextInt();
		}

		Arrays.sort(AB);

		int s = 0;

		for (int i = 0; i < 2; i++) {
			s += AB[1];
			AB[1]--;
			Arrays.sort(AB);
		}
		System.out.println(s);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int AB[] = new int[2];

		for (int i = 0; i < 2; i++) {
			AB[i] = sc.nextInt();
		}

		Arrays.sort(AB);

		int s = 0;

		for (int i = 0; i < 2; i++) {
			s += AB[1];
			AB[1]--;
			Arrays.sort(AB);
		}
		System.out.println(s);
	}
} 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 AB[] = new int[2];

		for (int i = 0; i < 2; i++) {
			AB[i] = sc.nextInt();
		}

		Arrays.sort(AB);

		int s = 0;

		for (int i = 0; i < 2; i++) {
			s += AB[1];
			AB[1]--;
			Arrays.sort(AB);
		}
		System.out.println(s);
	}
}