import java.util.Scanner;

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

        int a = sc.nextInt();
        int b = sc.nextInt();

        int c = 0;

        if (a >= b){
            c = a - 1;
            if (b >= c){
                System.out.println(a + b);
            } else {
                System.out.println(a + c);
            }
        } else {
            c = b - 1;
            if (a >= c){
                System.out.println(a + b);
            } else {
                System.out.println(b + c);
            }
        }
        sc.close();
    }
} import java.util.Scanner; Scanner 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();

        int c = 0;

        if (a >= b){
            c = a - 1;
            if (b >= c){
                System.out.println(a + b);
            } else {
                System.out.println(a + c);
            }
        } else {
            c = b - 1;
            if (a >= c){
                System.out.println(a + b);
            } else {
                System.out.println(b + c);
            }
        }
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();

        int c = 0;

        if (a >= b){
            c = a - 1;
            if (b >= c){
                System.out.println(a + b);
            } else {
                System.out.println(a + c);
            }
        } else {
            c = b - 1;
            if (a >= c){
                System.out.println(a + b);
            } else {
                System.out.println(b + c);
            }
        }
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();

        int c = 0;

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

        int a = sc.nextInt();
        int b = sc.nextInt();

        int c = 0;

        if (a >= b){
            c = a - 1;
            if (b >= c){
                System.out.println(a + b);
            } else {
                System.out.println(a + c);
            }
        } else {
            c = b - 1;
            if (a >= c){
                System.out.println(a + b);
            } else {
                System.out.println(b + c);
            }
        }
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();

        int c = 0;

        if (a >= b){
            c = a - 1;
            if (b >= c){
                System.out.println(a + b);
            } else {
                System.out.println(a + c);
            }
        } else {
            c = b - 1;
            if (a >= c){
                System.out.println(a + b);
            } else {
                System.out.println(b + c);
            }
        }
        sc.close();
    }
} Main
import java.util.Scanner;

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

        int a = sc.nextInt();
        int b = sc.nextInt();

        int c = 0;

        if (a >= b){
            c = a - 1;
            if (b >= c){
                System.out.println(a + b);
            } else {
                System.out.println(a + c);
            }
        } else {
            c = b - 1;
            if (a >= c){
                System.out.println(a + b);
            } else {
                System.out.println(b + c);
            }
        }
        sc.close();
    }
}
