import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner scanner = new Scanner(System.in);
		
		String input = scanner.nextLine();

		scanner.close();
		
		String[] inputs = input.split(" ", 0);
		
		String inAStr = inputs[0];
		String inBStr = inputs[1];
		
		Integer inA = Integer.parseInt(inAStr);
		Integer inB = Integer.parseInt(inBStr);
		
		Integer valAA = inA + inA - 1;
		Integer valAB = inA + inB;
		Integer valBB = inB + inB - 1;
		
		Integer max = valAA < valAB ? valAB : valAA;
		Integer max2 = max < valBB ? valBB : max;
		
		System.out.println(max2);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner scanner = new Scanner(System.in);
		
		String input = scanner.nextLine();

		scanner.close();
		
		String[] inputs = input.split(" ", 0);
		
		String inAStr = inputs[0];
		String inBStr = inputs[1];
		
		Integer inA = Integer.parseInt(inAStr);
		Integer inB = Integer.parseInt(inBStr);
		
		Integer valAA = inA + inA - 1;
		Integer valAB = inA + inB;
		Integer valBB = inB + inB - 1;
		
		Integer max = valAA < valAB ? valAB : valAA;
		Integer max2 = max < valBB ? valBB : max;
		
		System.out.println(max2);
	}
} Main public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner scanner = new Scanner(System.in);
		
		String input = scanner.nextLine();

		scanner.close();
		
		String[] inputs = input.split(" ", 0);
		
		String inAStr = inputs[0];
		String inBStr = inputs[1];
		
		Integer inA = Integer.parseInt(inAStr);
		Integer inB = Integer.parseInt(inBStr);
		
		Integer valAA = inA + inA - 1;
		Integer valAB = inA + inB;
		Integer valBB = inB + inB - 1;
		
		Integer max = valAA < valAB ? valAB : valAA;
		Integer max2 = max < valBB ? valBB : max;
		
		System.out.println(max2);
	} main {
		// TODO Auto-generated method stub

		Scanner scanner = new Scanner(System.in);
		
		String input = scanner.nextLine();

		scanner.close();
		
		String[] inputs = input.split(" ", 0);
		
		String inAStr = inputs[0];
		String inBStr = inputs[1];
		
		Integer inA = Integer.parseInt(inAStr);
		Integer inB = Integer.parseInt(inBStr);
		
		Integer valAA = inA + inA - 1;
		Integer valAB = inA + inB;
		Integer valBB = inB + inB - 1;
		
		Integer max = valAA < valAB ? valAB : valAA;
		Integer max2 = max < valBB ? valBB : max;
		
		System.out.println(max2);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner scanner.close() scanner.close scanner String[] inputs = input.split(" ", 0); inputs input.split(" ", 0) input.split input " " 0 String inAStr = inputs[0]; inAStr inputs[0] inputs 0 String inBStr = inputs[1]; inBStr inputs[1] inputs 1 Integer inA = Integer.parseInt(inAStr); inA Integer.parseInt(inAStr) Integer.parseInt Integer inAStr Integer inB = Integer.parseInt(inBStr); inB Integer.parseInt(inBStr) Integer.parseInt Integer inBStr Integer valAA = inA + inA - 1; valAA inA + inA - 1 inA + inA inA inA 1 Integer valAB = inA + inB; valAB inA + inB inA inB Integer valBB = inB + inB - 1; valBB inB + inB - 1 inB + inB inB inB 1 Integer max = valAA < valAB ? valAB : valAA; max valAA < valAB ? valAB : valAA valAA < valAB valAA valAB valAB valAA Integer max2 = max < valBB ? valBB : max; max2 max < valBB ? valBB : max max < valBB max valBB valBB max System.out.println(max2) System.out.println System.out System System.out max2 String[] args args public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner scanner = new Scanner(System.in);
		
		String input = scanner.nextLine();

		scanner.close();
		
		String[] inputs = input.split(" ", 0);
		
		String inAStr = inputs[0];
		String inBStr = inputs[1];
		
		Integer inA = Integer.parseInt(inAStr);
		Integer inB = Integer.parseInt(inBStr);
		
		Integer valAA = inA + inA - 1;
		Integer valAB = inA + inB;
		Integer valBB = inB + inB - 1;
		
		Integer max = valAA < valAB ? valAB : valAA;
		Integer max2 = max < valBB ? valBB : max;
		
		System.out.println(max2);
	}
} public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner scanner = new Scanner(System.in);
		
		String input = scanner.nextLine();

		scanner.close();
		
		String[] inputs = input.split(" ", 0);
		
		String inAStr = inputs[0];
		String inBStr = inputs[1];
		
		Integer inA = Integer.parseInt(inAStr);
		Integer inB = Integer.parseInt(inBStr);
		
		Integer valAA = inA + inA - 1;
		Integer valAB = inA + inB;
		Integer valBB = inB + inB - 1;
		
		Integer max = valAA < valAB ? valAB : valAA;
		Integer max2 = max < valBB ? valBB : max;
		
		System.out.println(max2);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner scanner = new Scanner(System.in);
		
		String input = scanner.nextLine();

		scanner.close();
		
		String[] inputs = input.split(" ", 0);
		
		String inAStr = inputs[0];
		String inBStr = inputs[1];
		
		Integer inA = Integer.parseInt(inAStr);
		Integer inB = Integer.parseInt(inBStr);
		
		Integer valAA = inA + inA - 1;
		Integer valAB = inA + inB;
		Integer valBB = inB + inB - 1;
		
		Integer max = valAA < valAB ? valAB : valAA;
		Integer max2 = max < valBB ? valBB : max;
		
		System.out.println(max2);
	}
}
