

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

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int a[] = new int[4];
		a[0] = sc.nextInt();
		a[1] = sc.nextInt();
		a[2] = a[0] - 1;
		a[3] = a[1] - 1;

		Arrays.sort(a);

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

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

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int a[] = new int[4];
		a[0] = sc.nextInt();
		a[1] = sc.nextInt();
		a[2] = a[0] - 1;
		a[3] = a[1] - 1;

		Arrays.sort(a);

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

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int a[] = new int[4];
		a[0] = sc.nextInt();
		a[1] = sc.nextInt();
		a[2] = a[0] - 1;
		a[3] = a[1] - 1;

		Arrays.sort(a);

		System.out.println(a[3] + a[2]);
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int a[] = new int[4];
		a[0] = sc.nextInt();
		a[1] = sc.nextInt();
		a[2] = a[0] - 1;
		a[3] = a[1] - 1;

		Arrays.sort(a);

		System.out.println(a[3] + a[2]);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a[] = new int[4]; a new int[4] 4 a[0] = sc.nextInt() a[0] a 0 sc.nextInt() sc.nextInt sc a[1] = sc.nextInt() a[1] a 1 sc.nextInt() sc.nextInt sc a[2] = a[0] - 1 a[2] a 2 a[0] - 1 a[0] a 0 1 a[3] = a[1] - 1 a[3] a 3 a[1] - 1 a[1] a 1 1 Arrays.sort(a) Arrays.sort Arrays a System.out.println(a[3] + a[2]) System.out.println System.out System System.out a[3] + a[2] a[3] a 3 a[2] a 2 String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int a[] = new int[4];
		a[0] = sc.nextInt();
		a[1] = sc.nextInt();
		a[2] = a[0] - 1;
		a[3] = a[1] - 1;

		Arrays.sort(a);

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

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int a[] = new int[4];
		a[0] = sc.nextInt();
		a[1] = sc.nextInt();
		a[2] = a[0] - 1;
		a[3] = a[1] - 1;

		Arrays.sort(a);

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

} Main


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

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		int a[] = new int[4];
		a[0] = sc.nextInt();
		a[1] = sc.nextInt();
		a[2] = a[0] - 1;
		a[3] = a[1] - 1;

		Arrays.sort(a);

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

}
