import java.util.Scanner;

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

        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());
        int coins = 0;

        for (int i = 0; i < 2; i++) {
            coins += Math.max(A, B);
            if (A > B) {
                A--;
            } else {
                B--;
            }
        }
        System.out.print(coins);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());
        int coins = 0;

        for (int i = 0; i < 2; i++) {
            coins += Math.max(A, B);
            if (A > B) {
                A--;
            } else {
                B--;
            }
        }
        System.out.print(coins);
    }
} Main public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());
        int coins = 0;

        for (int i = 0; i < 2; i++) {
            coins += Math.max(A, B);
            if (A > B) {
                A--;
            } else {
                B--;
            }
        }
        System.out.print(coins);
    } main {
        final Scanner sc = new Scanner(System.in);

        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());
        int coins = 0;

        for (int i = 0; i < 2; i++) {
            coins += Math.max(A, B);
            if (A > B) {
                A--;
            } else {
                B--;
            }
        }
        System.out.print(coins);
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = Integer.parseInt(sc.next()); A Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int B = Integer.parseInt(sc.next()); B Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int coins = 0; coins 0 for (int i = 0; i < 2; i++) {
            coins += Math.max(A, B);
            if (A > B) {
                A--;
            } else {
                B--;
            }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            coins += Math.max(A, B);
            if (A > B) {
                A--;
            } else {
                B--;
            }
        } {
            coins += Math.max(A, B);
            if (A > B) {
                A--;
            } else {
                B--;
            }
        } coins += Math.max(A, B) coins Math.max(A, B) Math.max Math A B if (A > B) {
                A--;
            } else {
                B--;
            } A > B A B {
                A--;
            } A-- A {
                B--;
            } B-- B System.out.print(coins) System.out.print System.out System System.out coins String[] args args public class Main {
    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());
        int coins = 0;

        for (int i = 0; i < 2; i++) {
            coins += Math.max(A, B);
            if (A > B) {
                A--;
            } else {
                B--;
            }
        }
        System.out.print(coins);
    }
} public class Main {
    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());
        int coins = 0;

        for (int i = 0; i < 2; i++) {
            coins += Math.max(A, B);
            if (A > B) {
                A--;
            } else {
                B--;
            }
        }
        System.out.print(coins);
    }
} Main
import java.util.Scanner;

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

        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());
        int coins = 0;

        for (int i = 0; i < 2; i++) {
            coins += Math.max(A, B);
            if (A > B) {
                A--;
            } else {
                B--;
            }
        }
        System.out.print(coins);
    }
}