import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] input = scanner.nextLine().split(" ");
    int input1 = Integer.parseInt(input[0]);
    int input2 = Integer.parseInt(input[1]);
    
    int sum = 0;
    for (int i = 0; i < 2; i++) {
      if (input1 > input2) {
        sum += input1;
        input1--;
      }
      else {
        sum += input2;
        input2--;
      }
    }
    System.out.println(sum);
  }
} import java.util.Scanner; Scanner java.util class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] input = scanner.nextLine().split(" ");
    int input1 = Integer.parseInt(input[0]);
    int input2 = Integer.parseInt(input[1]);
    
    int sum = 0;
    for (int i = 0; i < 2; i++) {
      if (input1 > input2) {
        sum += input1;
        input1--;
      }
      else {
        sum += input2;
        input2--;
      }
    }
    System.out.println(sum);
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] input = scanner.nextLine().split(" ");
    int input1 = Integer.parseInt(input[0]);
    int input2 = Integer.parseInt(input[1]);
    
    int sum = 0;
    for (int i = 0; i < 2; i++) {
      if (input1 > input2) {
        sum += input1;
        input1--;
      }
      else {
        sum += input2;
        input2--;
      }
    }
    System.out.println(sum);
  } main {
    Scanner scanner = new Scanner(System.in);
    String[] input = scanner.nextLine().split(" ");
    int input1 = Integer.parseInt(input[0]);
    int input2 = Integer.parseInt(input[1]);
    
    int sum = 0;
    for (int i = 0; i < 2; i++) {
      if (input1 > input2) {
        sum += input1;
        input1--;
      }
      else {
        sum += input2;
        input2--;
      }
    }
    System.out.println(sum);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] input = scanner.nextLine().split(" "); input scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " int input1 = Integer.parseInt(input[0]); input1 Integer.parseInt(input[0]) Integer.parseInt Integer input[0] input 0 int input2 = Integer.parseInt(input[1]); input2 Integer.parseInt(input[1]) Integer.parseInt Integer input[1] input 1 int sum = 0; sum 0 for (int i = 0; i < 2; i++) {
      if (input1 > input2) {
        sum += input1;
        input1--;
      }
      else {
        sum += input2;
        input2--;
      }
    } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
      if (input1 > input2) {
        sum += input1;
        input1--;
      }
      else {
        sum += input2;
        input2--;
      }
    } {
      if (input1 > input2) {
        sum += input1;
        input1--;
      }
      else {
        sum += input2;
        input2--;
      }
    } if (input1 > input2) {
        sum += input1;
        input1--;
      }
      else {
        sum += input2;
        input2--;
      } input1 > input2 input1 input2 {
        sum += input1;
        input1--;
      } sum += input1 sum input1 input1-- input1 {
        sum += input2;
        input2--;
      } sum += input2 sum input2 input2-- input2 System.out.println(sum) System.out.println System.out System System.out sum String[] args args
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] input = scanner.nextLine().split(" ");
    int input1 = Integer.parseInt(input[0]);
    int input2 = Integer.parseInt(input[1]);
    
    int sum = 0;
    for (int i = 0; i < 2; i++) {
      if (input1 > input2) {
        sum += input1;
        input1--;
      }
      else {
        sum += input2;
        input2--;
      }
    }
    System.out.println(sum);
  }
}