import java.util.*;
import static java.lang.System.*;
public class Main {
    public static boolean oneFlg = true;
    public static void main(String[] args) throws Exception {
      Scanner sc = new Scanner(System.in);
      int btn1V = sc.nextInt();
      int btn2V = sc.nextInt();
      int sumM = 0;
      int max = comp(btn1V,btn2V);
      sumM = sumM + max;
      max--;
      if(!oneFlg){
          sumM = sumM + comp(max,btn2V);
      } else {
          sumM = sumM + comp(btn1V,max);
      }
      out.println(sumM);
        
    }
    //二つの値のうち、大きい値を求める。同じ値なら、v1を返す
    public static int comp(int v1,int v2){
        if(v1 <= v2){
            oneFlg = true;
            return v2;
        } else if(v1 > v2){
            oneFlg = false;
            return v1;
        }
        return -1;
    }
} import java.util.*; util.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {
    public static boolean oneFlg = true;
    public static void main(String[] args) throws Exception {
      Scanner sc = new Scanner(System.in);
      int btn1V = sc.nextInt();
      int btn2V = sc.nextInt();
      int sumM = 0;
      int max = comp(btn1V,btn2V);
      sumM = sumM + max;
      max--;
      if(!oneFlg){
          sumM = sumM + comp(max,btn2V);
      } else {
          sumM = sumM + comp(btn1V,max);
      }
      out.println(sumM);
        
    }
    //二つの値のうち、大きい値を求める。同じ値なら、v1を返す
    public static int comp(int v1,int v2){
        if(v1 <= v2){
            oneFlg = true;
            return v2;
        } else if(v1 > v2){
            oneFlg = false;
            return v1;
        }
        return -1;
    }
} Main public static boolean oneFlg = true; oneFlg true public static void main(String[] args) throws Exception {
      Scanner sc = new Scanner(System.in);
      int btn1V = sc.nextInt();
      int btn2V = sc.nextInt();
      int sumM = 0;
      int max = comp(btn1V,btn2V);
      sumM = sumM + max;
      max--;
      if(!oneFlg){
          sumM = sumM + comp(max,btn2V);
      } else {
          sumM = sumM + comp(btn1V,max);
      }
      out.println(sumM);
        
    } main {
      Scanner sc = new Scanner(System.in);
      int btn1V = sc.nextInt();
      int btn2V = sc.nextInt();
      int sumM = 0;
      int max = comp(btn1V,btn2V);
      sumM = sumM + max;
      max--;
      if(!oneFlg){
          sumM = sumM + comp(max,btn2V);
      } else {
          sumM = sumM + comp(btn1V,max);
      }
      out.println(sumM);
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int btn1V = sc.nextInt(); btn1V sc.nextInt() sc.nextInt sc int btn2V = sc.nextInt(); btn2V sc.nextInt() sc.nextInt sc int sumM = 0; sumM 0 int max = comp(btn1V,btn2V); max comp(btn1V,btn2V) comp btn1V btn2V sumM = sumM + max sumM sumM + max sumM max max-- max if(!oneFlg){
          sumM = sumM + comp(max,btn2V);
      } else {
          sumM = sumM + comp(btn1V,max);
      } !oneFlg oneFlg {
          sumM = sumM + comp(max,btn2V);
      } sumM = sumM + comp(max,btn2V) sumM sumM + comp(max,btn2V) sumM comp(max,btn2V) comp max btn2V {
          sumM = sumM + comp(btn1V,max);
      } sumM = sumM + comp(btn1V,max) sumM sumM + comp(btn1V,max) sumM comp(btn1V,max) comp btn1V max out.println(sumM) out.println out sumM String[] args args //二つの値のうち、大きい値を求める。同じ値なら、v1を返す
    public static int comp(int v1,int v2){
        if(v1 <= v2){
            oneFlg = true;
            return v2;
        } else if(v1 > v2){
            oneFlg = false;
            return v1;
        }
        return -1;
    } comp {
        if(v1 <= v2){
            oneFlg = true;
            return v2;
        } else if(v1 > v2){
            oneFlg = false;
            return v1;
        }
        return -1;
    } if(v1 <= v2){
            oneFlg = true;
            return v2;
        } else if(v1 > v2){
            oneFlg = false;
            return v1;
        } v1 <= v2 v1 v2 {
            oneFlg = true;
            return v2;
        } oneFlg = true oneFlg true return v2; v2 if(v1 > v2){
            oneFlg = false;
            return v1;
        } v1 > v2 v1 v2 {
            oneFlg = false;
            return v1;
        } oneFlg = false oneFlg false return v1; v1 return -1; -1 1 int v1 v1 int v2 v2 public class Main {
    public static boolean oneFlg = true;
    public static void main(String[] args) throws Exception {
      Scanner sc = new Scanner(System.in);
      int btn1V = sc.nextInt();
      int btn2V = sc.nextInt();
      int sumM = 0;
      int max = comp(btn1V,btn2V);
      sumM = sumM + max;
      max--;
      if(!oneFlg){
          sumM = sumM + comp(max,btn2V);
      } else {
          sumM = sumM + comp(btn1V,max);
      }
      out.println(sumM);
        
    }
    //二つの値のうち、大きい値を求める。同じ値なら、v1を返す
    public static int comp(int v1,int v2){
        if(v1 <= v2){
            oneFlg = true;
            return v2;
        } else if(v1 > v2){
            oneFlg = false;
            return v1;
        }
        return -1;
    }
} public class Main {
    public static boolean oneFlg = true;
    public static void main(String[] args) throws Exception {
      Scanner sc = new Scanner(System.in);
      int btn1V = sc.nextInt();
      int btn2V = sc.nextInt();
      int sumM = 0;
      int max = comp(btn1V,btn2V);
      sumM = sumM + max;
      max--;
      if(!oneFlg){
          sumM = sumM + comp(max,btn2V);
      } else {
          sumM = sumM + comp(btn1V,max);
      }
      out.println(sumM);
        
    }
    //二つの値のうち、大きい値を求める。同じ値なら、v1を返す
    public static int comp(int v1,int v2){
        if(v1 <= v2){
            oneFlg = true;
            return v2;
        } else if(v1 > v2){
            oneFlg = false;
            return v1;
        }
        return -1;
    }
} Main
import java.util.*;
import static java.lang.System.*;
public class Main {
    public static boolean oneFlg = true;
    public static void main(String[] args) throws Exception {
      Scanner sc = new Scanner(System.in);
      int btn1V = sc.nextInt();
      int btn2V = sc.nextInt();
      int sumM = 0;
      int max = comp(btn1V,btn2V);
      sumM = sumM + max;
      max--;
      if(!oneFlg){
          sumM = sumM + comp(max,btn2V);
      } else {
          sumM = sumM + comp(btn1V,max);
      }
      out.println(sumM);
        
    }
    //二つの値のうち、大きい値を求める。同じ値なら、v1を返す
    public static int comp(int v1,int v2){
        if(v1 <= v2){
            oneFlg = true;
            return v2;
        } else if(v1 > v2){
            oneFlg = false;
            return v1;
        }
        return -1;
    }
}
