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