import java.util.Scanner;
class Main{
    public static void main(String[] args) {
        Scanner scn=new Scanner(System.in);
        int a_button=scn.nextInt();
        int b_button=scn.nextInt();
        int total=0;
        for(int i=0;i<2;i++){
            int compare=a_button-b_button;
            if(compare>=0){
                total+=a_button;
                a_button--;
            }else{
                total+=b_button;
                b_button--;
            }
        }
        System.out.println(total);
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args) {
        Scanner scn=new Scanner(System.in);
        int a_button=scn.nextInt();
        int b_button=scn.nextInt();
        int total=0;
        for(int i=0;i<2;i++){
            int compare=a_button-b_button;
            if(compare>=0){
                total+=a_button;
                a_button--;
            }else{
                total+=b_button;
                b_button--;
            }
        }
        System.out.println(total);
    }
} Main public static void main(String[] args) {
        Scanner scn=new Scanner(System.in);
        int a_button=scn.nextInt();
        int b_button=scn.nextInt();
        int total=0;
        for(int i=0;i<2;i++){
            int compare=a_button-b_button;
            if(compare>=0){
                total+=a_button;
                a_button--;
            }else{
                total+=b_button;
                b_button--;
            }
        }
        System.out.println(total);
    } main {
        Scanner scn=new Scanner(System.in);
        int a_button=scn.nextInt();
        int b_button=scn.nextInt();
        int total=0;
        for(int i=0;i<2;i++){
            int compare=a_button-b_button;
            if(compare>=0){
                total+=a_button;
                a_button--;
            }else{
                total+=b_button;
                b_button--;
            }
        }
        System.out.println(total);
    } Scanner scn=new Scanner(System.in); scn new Scanner(System.in) int a_button=scn.nextInt(); a_button scn.nextInt() scn.nextInt scn int b_button=scn.nextInt(); b_button scn.nextInt() scn.nextInt scn int total=0; total 0 for(int i=0;i<2;i++){
            int compare=a_button-b_button;
            if(compare>=0){
                total+=a_button;
                a_button--;
            }else{
                total+=b_button;
                b_button--;
            }
        } int i=0; int i=0; i 0 i<2 i 2 i++ i++ i {
            int compare=a_button-b_button;
            if(compare>=0){
                total+=a_button;
                a_button--;
            }else{
                total+=b_button;
                b_button--;
            }
        } {
            int compare=a_button-b_button;
            if(compare>=0){
                total+=a_button;
                a_button--;
            }else{
                total+=b_button;
                b_button--;
            }
        } int compare=a_button-b_button; compare a_button-b_button a_button b_button if(compare>=0){
                total+=a_button;
                a_button--;
            }else{
                total+=b_button;
                b_button--;
            } compare>=0 compare 0 {
                total+=a_button;
                a_button--;
            } total+=a_button total a_button a_button-- a_button {
                total+=b_button;
                b_button--;
            } total+=b_button total b_button b_button-- b_button System.out.println(total) System.out.println System.out System System.out total String[] args args
import java.util.Scanner;
class Main{
    public static void main(String[] args) {
        Scanner scn=new Scanner(System.in);
        int a_button=scn.nextInt();
        int b_button=scn.nextInt();
        int total=0;
        for(int i=0;i<2;i++){
            int compare=a_button-b_button;
            if(compare>=0){
                total+=a_button;
                a_button--;
            }else{
                total+=b_button;
                b_button--;
            }
        }
        System.out.println(total);
    }
}