import java.util.Scanner;

class Main{
  static int answer(int a, int b) {
    int answer = 0;
    for(int i = 0; i < 2; i++) {
      if(a>=b) {
        answer += a;
        a--;
      }else {
        answer += b;
        b--;
      }
    }
    return answer;
  }

  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int a = stdIn.nextInt();
    int b = stdIn.nextInt();
    System.out.println(answer(a, b));
  }
} import java.util.Scanner; Scanner java.util class Main{
  static int answer(int a, int b) {
    int answer = 0;
    for(int i = 0; i < 2; i++) {
      if(a>=b) {
        answer += a;
        a--;
      }else {
        answer += b;
        b--;
      }
    }
    return answer;
  }

  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int a = stdIn.nextInt();
    int b = stdIn.nextInt();
    System.out.println(answer(a, b));
  }
} Main static int answer(int a, int b) {
    int answer = 0;
    for(int i = 0; i < 2; i++) {
      if(a>=b) {
        answer += a;
        a--;
      }else {
        answer += b;
        b--;
      }
    }
    return answer;
  } answer {
    int answer = 0;
    for(int i = 0; i < 2; i++) {
      if(a>=b) {
        answer += a;
        a--;
      }else {
        answer += b;
        b--;
      }
    }
    return answer;
  } int answer = 0; answer 0 for(int i = 0; i < 2; i++) {
      if(a>=b) {
        answer += a;
        a--;
      }else {
        answer += b;
        b--;
      }
    } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
      if(a>=b) {
        answer += a;
        a--;
      }else {
        answer += b;
        b--;
      }
    } {
      if(a>=b) {
        answer += a;
        a--;
      }else {
        answer += b;
        b--;
      }
    } if(a>=b) {
        answer += a;
        a--;
      }else {
        answer += b;
        b--;
      } a>=b a b {
        answer += a;
        a--;
      } answer += a answer a a-- a {
        answer += b;
        b--;
      } answer += b answer b b-- b return answer; answer int a a int b b public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int a = stdIn.nextInt();
    int b = stdIn.nextInt();
    System.out.println(answer(a, b));
  } main {
    Scanner stdIn = new Scanner(System.in);
    int a = stdIn.nextInt();
    int b = stdIn.nextInt();
    System.out.println(answer(a, b));
  } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int a = stdIn.nextInt(); a stdIn.nextInt() stdIn.nextInt stdIn int b = stdIn.nextInt(); b stdIn.nextInt() stdIn.nextInt stdIn System.out.println(answer(a, b)) System.out.println System.out System System.out answer(a, b) answer a b String[] args args
import java.util.Scanner;

class Main{
  static int answer(int a, int b) {
    int answer = 0;
    for(int i = 0; i < 2; i++) {
      if(a>=b) {
        answer += a;
        a--;
      }else {
        answer += b;
        b--;
      }
    }
    return answer;
  }

  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int a = stdIn.nextInt();
    int b = stdIn.nextInt();
    System.out.println(answer(a, b));
  }
}