import java.util.Scanner;
import java.lang.Math;

class Main {
    public static void main(String[] args) {
        // input
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        int X = Math.max(2 * A - 1, Math.max(A + B, 2 * B - 1));
        scanner.close();
        // output
        System.out.println(X);
        System.out.flush();
    }
} import java.util.Scanner; Scanner java.util import java.lang.Math; Math java.lang class Main {
    public static void main(String[] args) {
        // input
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        int X = Math.max(2 * A - 1, Math.max(A + B, 2 * B - 1));
        scanner.close();
        // output
        System.out.println(X);
        System.out.flush();
    }
} Main public static void main(String[] args) {
        // input
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        int X = Math.max(2 * A - 1, Math.max(A + B, 2 * B - 1));
        scanner.close();
        // output
        System.out.println(X);
        System.out.flush();
    } main {
        // input
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        int X = Math.max(2 * A - 1, Math.max(A + B, 2 * B - 1));
        scanner.close();
        // output
        System.out.println(X);
        System.out.flush();
    } 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 X = Math.max(2 * A - 1, Math.max(A + B, 2 * B - 1)); X Math.max(2 * A - 1, Math.max(A + B, 2 * B - 1)) Math.max Math 2 * A - 1 2 * A 2 A 1 Math.max(A + B, 2 * B - 1) Math.max Math A + B A B 2 * B - 1 2 * B 2 B 1 scanner.close() scanner.close scanner System.out.println(X) System.out.println System.out System System.out X System.out.flush() System.out.flush System.out System System.out String[] args args
import java.util.Scanner;
import java.lang.Math;

class Main {
    public static void main(String[] args) {
        // input
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        int X = Math.max(2 * A - 1, Math.max(A + B, 2 * B - 1));
        scanner.close();
        // output
        System.out.println(X);
        System.out.flush();
    }
}