import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    new Main().run();
  }

  private static Scanner sc = new Scanner(System.in);

  int getCoin(int great, int less) {
    if (great - less >= 2) {
      return great + great - 1;
    } else {
      return great + less;
    }
  }

  private void run() {
    int A = Integer.parseInt(sc.next());
    int B = Integer.parseInt(sc.next());


    if (A > B) {
      System.out.println(getCoin(A, B));
    } else if (A < B) {
      System.out.println(getCoin(B, A));
    } else {
      System.out.println(A * 2);
    }
  }
} import java.util.Scanner; Scanner java.util class Main {

  public static void main(String[] args) {
    new Main().run();
  }

  private static Scanner sc = new Scanner(System.in);

  int getCoin(int great, int less) {
    if (great - less >= 2) {
      return great + great - 1;
    } else {
      return great + less;
    }
  }

  private void run() {
    int A = Integer.parseInt(sc.next());
    int B = Integer.parseInt(sc.next());


    if (A > B) {
      System.out.println(getCoin(A, B));
    } else if (A < B) {
      System.out.println(getCoin(B, A));
    } else {
      System.out.println(A * 2);
    }
  }
} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
    new Main().run();
  } main {
    new Main().run();
  } new Main().run() new Main().run new Main() String[] args args int getCoin(int great, int less) {
    if (great - less >= 2) {
      return great + great - 1;
    } else {
      return great + less;
    }
  } getCoin {
    if (great - less >= 2) {
      return great + great - 1;
    } else {
      return great + less;
    }
  } if (great - less >= 2) {
      return great + great - 1;
    } else {
      return great + less;
    } great - less >= 2 great - less great less 2 {
      return great + great - 1;
    } return great + great - 1; great + great - 1 great + great great great 1 {
      return great + less;
    } return great + less; great + less great less int great great int less less private void run() {
    int A = Integer.parseInt(sc.next());
    int B = Integer.parseInt(sc.next());


    if (A > B) {
      System.out.println(getCoin(A, B));
    } else if (A < B) {
      System.out.println(getCoin(B, A));
    } else {
      System.out.println(A * 2);
    }
  } run {
    int A = Integer.parseInt(sc.next());
    int B = Integer.parseInt(sc.next());


    if (A > B) {
      System.out.println(getCoin(A, B));
    } else if (A < B) {
      System.out.println(getCoin(B, A));
    } else {
      System.out.println(A * 2);
    }
  } int A = Integer.parseInt(sc.next()); A Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int B = Integer.parseInt(sc.next()); B Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if (A > B) {
      System.out.println(getCoin(A, B));
    } else if (A < B) {
      System.out.println(getCoin(B, A));
    } else {
      System.out.println(A * 2);
    } A > B A B {
      System.out.println(getCoin(A, B));
    } System.out.println(getCoin(A, B)) System.out.println System.out System System.out getCoin(A, B) getCoin A B if (A < B) {
      System.out.println(getCoin(B, A));
    } else {
      System.out.println(A * 2);
    } A < B A B {
      System.out.println(getCoin(B, A));
    } System.out.println(getCoin(B, A)) System.out.println System.out System System.out getCoin(B, A) getCoin B A {
      System.out.println(A * 2);
    } System.out.println(A * 2) System.out.println System.out System System.out A * 2 A 2
import java.util.Scanner;

class Main {

  public static void main(String[] args) {
    new Main().run();
  }

  private static Scanner sc = new Scanner(System.in);

  int getCoin(int great, int less) {
    if (great - less >= 2) {
      return great + great - 1;
    } else {
      return great + less;
    }
  }

  private void run() {
    int A = Integer.parseInt(sc.next());
    int B = Integer.parseInt(sc.next());


    if (A > B) {
      System.out.println(getCoin(A, B));
    } else if (A < B) {
      System.out.println(getCoin(B, A));
    } else {
      System.out.println(A * 2);
    }
  }
}
