import java.util.*;

class Main {
  public static void main(String[] args){
  Scanner sc = new Scanner(System.in);
  int a = sc.nextInt();
  int b = sc.nextInt();
  Integer array[] = {a,b,a-1,b-1};
  Arrays.sort(array, Comparator.reverseOrder());
  int ans = array[0]+array[1];
  System.out.println(ans);
  }
} import java.util.*; util.* java class Main {
  public static void main(String[] args){
  Scanner sc = new Scanner(System.in);
  int a = sc.nextInt();
  int b = sc.nextInt();
  Integer array[] = {a,b,a-1,b-1};
  Arrays.sort(array, Comparator.reverseOrder());
  int ans = array[0]+array[1];
  System.out.println(ans);
  }
} Main public static void main(String[] args){
  Scanner sc = new Scanner(System.in);
  int a = sc.nextInt();
  int b = sc.nextInt();
  Integer array[] = {a,b,a-1,b-1};
  Arrays.sort(array, Comparator.reverseOrder());
  int ans = array[0]+array[1];
  System.out.println(ans);
  } main {
  Scanner sc = new Scanner(System.in);
  int a = sc.nextInt();
  int b = sc.nextInt();
  Integer array[] = {a,b,a-1,b-1};
  Arrays.sort(array, Comparator.reverseOrder());
  int ans = array[0]+array[1];
  System.out.println(ans);
  } 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 Integer array[] = {a,b,a-1,b-1}; array {a,b,a-1,b-1} a b a-1 a 1 b-1 b 1 Arrays.sort(array, Comparator.reverseOrder()) Arrays.sort Arrays array Comparator.reverseOrder() Comparator.reverseOrder Comparator int ans = array[0]+array[1]; ans array[0]+array[1] array[0] array 0 array[1] array 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;

class Main {
  public static void main(String[] args){
  Scanner sc = new Scanner(System.in);
  int a = sc.nextInt();
  int b = sc.nextInt();
  Integer array[] = {a,b,a-1,b-1};
  Arrays.sort(array, Comparator.reverseOrder());
  int ans = array[0]+array[1];
  System.out.println(ans);
  }
}