import java.util.Scanner;

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

        int anum = Integer.parseInt(s.next());
        int bnum = Integer.parseInt(s.next());

        int coins = 0;
        for (int i = 0; i < 2; i++) {
            if (anum < bnum) {
                coins += bnum;
                bnum--;
            } else{
                coins += anum;
                anum--;
            }
        }
        System.out.println(coins);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);

        int anum = Integer.parseInt(s.next());
        int bnum = Integer.parseInt(s.next());

        int coins = 0;
        for (int i = 0; i < 2; i++) {
            if (anum < bnum) {
                coins += bnum;
                bnum--;
            } else{
                coins += anum;
                anum--;
            }
        }
        System.out.println(coins);
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);

        int anum = Integer.parseInt(s.next());
        int bnum = Integer.parseInt(s.next());

        int coins = 0;
        for (int i = 0; i < 2; i++) {
            if (anum < bnum) {
                coins += bnum;
                bnum--;
            } else{
                coins += anum;
                anum--;
            }
        }
        System.out.println(coins);
    } main {
        Scanner s = new Scanner(System.in);

        int anum = Integer.parseInt(s.next());
        int bnum = Integer.parseInt(s.next());

        int coins = 0;
        for (int i = 0; i < 2; i++) {
            if (anum < bnum) {
                coins += bnum;
                bnum--;
            } else{
                coins += anum;
                anum--;
            }
        }
        System.out.println(coins);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int anum = Integer.parseInt(s.next()); anum Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s int bnum = Integer.parseInt(s.next()); bnum Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s int coins = 0; coins 0 for (int i = 0; i < 2; i++) {
            if (anum < bnum) {
                coins += bnum;
                bnum--;
            } else{
                coins += anum;
                anum--;
            }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            if (anum < bnum) {
                coins += bnum;
                bnum--;
            } else{
                coins += anum;
                anum--;
            }
        } {
            if (anum < bnum) {
                coins += bnum;
                bnum--;
            } else{
                coins += anum;
                anum--;
            }
        } if (anum < bnum) {
                coins += bnum;
                bnum--;
            } else{
                coins += anum;
                anum--;
            } anum < bnum anum bnum {
                coins += bnum;
                bnum--;
            } coins += bnum coins bnum bnum-- bnum {
                coins += anum;
                anum--;
            } coins += anum coins anum anum-- anum System.out.println(coins) System.out.println System.out System System.out coins String[] args args public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);

        int anum = Integer.parseInt(s.next());
        int bnum = Integer.parseInt(s.next());

        int coins = 0;
        for (int i = 0; i < 2; i++) {
            if (anum < bnum) {
                coins += bnum;
                bnum--;
            } else{
                coins += anum;
                anum--;
            }
        }
        System.out.println(coins);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);

        int anum = Integer.parseInt(s.next());
        int bnum = Integer.parseInt(s.next());

        int coins = 0;
        for (int i = 0; i < 2; i++) {
            if (anum < bnum) {
                coins += bnum;
                bnum--;
            } else{
                coins += anum;
                anum--;
            }
        }
        System.out.println(coins);
    }
} Main
import java.util.Scanner;

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

        int anum = Integer.parseInt(s.next());
        int bnum = Integer.parseInt(s.next());

        int coins = 0;
        for (int i = 0; i < 2; i++) {
            if (anum < bnum) {
                coins += bnum;
                bnum--;
            } else{
                coins += anum;
                anum--;
            }
        }
        System.out.println(coins);
    }
}