import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    int max = 0;
    for(int i = 1; i<=2; i++){
      if(a>b){
        max+=a;
        a-=1;
      } else {
        max+=b;
        b-=1;
      }
    }
    System.out.println(max);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    int max = 0;
    for(int i = 1; i<=2; i++){
      if(a>b){
        max+=a;
        a-=1;
      } else {
        max+=b;
        b-=1;
      }
    }
    System.out.println(max);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    int max = 0;
    for(int i = 1; i<=2; i++){
      if(a>b){
        max+=a;
        a-=1;
      } else {
        max+=b;
        b-=1;
      }
    }
    System.out.println(max);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    int max = 0;
    for(int i = 1; i<=2; i++){
      if(a>b){
        max+=a;
        a-=1;
      } else {
        max+=b;
        b-=1;
      }
    }
    System.out.println(max);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] str = in.readLine().split(" "); str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int a = Integer.parseInt(str[0]); a Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int b = Integer.parseInt(str[1]); b Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int max = 0; max 0 for(int i = 1; i<=2; i++){
      if(a>b){
        max+=a;
        a-=1;
      } else {
        max+=b;
        b-=1;
      }
    } int i = 1; int i = 1; i 1 i<=2 i 2 i++ i++ i {
      if(a>b){
        max+=a;
        a-=1;
      } else {
        max+=b;
        b-=1;
      }
    } {
      if(a>b){
        max+=a;
        a-=1;
      } else {
        max+=b;
        b-=1;
      }
    } if(a>b){
        max+=a;
        a-=1;
      } else {
        max+=b;
        b-=1;
      } a>b a b {
        max+=a;
        a-=1;
      } max+=a max a a-=1 a 1 {
        max+=b;
        b-=1;
      } max+=b max b b-=1 b 1 System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    int max = 0;
    for(int i = 1; i<=2; i++){
      if(a>b){
        max+=a;
        a-=1;
      } else {
        max+=b;
        b-=1;
      }
    }
    System.out.println(max);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    int max = 0;
    for(int i = 1; i<=2; i++){
      if(a>b){
        max+=a;
        a-=1;
      } else {
        max+=b;
        b-=1;
      }
    }
    System.out.println(max);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    int max = 0;
    for(int i = 1; i<=2; i++){
      if(a>b){
        max+=a;
        a-=1;
      } else {
        max+=b;
        b-=1;
      }
    }
    System.out.println(max);
  }
}