import 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();
        System.out.println(helper(a, b));
        sc.close();
    }

    public static int helper(int a, int b) {
        if (a < b) return helper(b, a);
        if (a - b > 1) return 2 * a - 1;
        else return a + b;
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        System.out.println(helper(a, b));
        sc.close();
    }

    public static int helper(int a, int b) {
        if (a < b) return helper(b, a);
        if (a - b > 1) return 2 * a - 1;
        else return a + b;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        System.out.println(helper(a, b));
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        System.out.println(helper(a, b));
        sc.close();
    } 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 System.out.println(helper(a, b)) System.out.println System.out System System.out helper(a, b) helper a b sc.close() sc.close sc String[] args args public static int helper(int a, int b) {
        if (a < b) return helper(b, a);
        if (a - b > 1) return 2 * a - 1;
        else return a + b;
    } helper {
        if (a < b) return helper(b, a);
        if (a - b > 1) return 2 * a - 1;
        else return a + b;
    } if (a < b) return helper(b, a); a < b a b return helper(b, a); helper(b, a) helper b a if (a - b > 1) return 2 * a - 1;
        else return a + b; a - b > 1 a - b a b 1 return 2 * a - 1; 2 * a - 1 2 * a 2 a 1 return a + b; a + b a b int a a int b b public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        System.out.println(helper(a, b));
        sc.close();
    }

    public static int helper(int a, int b) {
        if (a < b) return helper(b, a);
        if (a - b > 1) return 2 * a - 1;
        else return a + b;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        System.out.println(helper(a, b));
        sc.close();
    }

    public static int helper(int a, int b) {
        if (a < b) return helper(b, a);
        if (a - b > 1) return 2 * a - 1;
        else return a + b;
    }
} Main
import 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();
        System.out.println(helper(a, b));
        sc.close();
    }

    public static int helper(int a, int b) {
        if (a < b) return helper(b, a);
        if (a - b > 1) return 2 * a - 1;
        else return a + b;
    }
}