import java.util.*;

public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M= sc.nextInt();
    int coin=0;
    int Max=Math.max(N,M);
    int Min=Math.min(N,M);
    coin=Max;
    if(Max-1>Min){
      coin+=Max-1;
    }else{
      coin+=Min;
    }
    System.out.println(coin);
  }} import java.util.*; util.* java public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M= sc.nextInt();
    int coin=0;
    int Max=Math.max(N,M);
    int Min=Math.min(N,M);
    coin=Max;
    if(Max-1>Min){
      coin+=Max-1;
    }else{
      coin+=Min;
    }
    System.out.println(coin);
  }} Main public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M= sc.nextInt();
    int coin=0;
    int Max=Math.max(N,M);
    int Min=Math.min(N,M);
    coin=Max;
    if(Max-1>Min){
      coin+=Max-1;
    }else{
      coin+=Min;
    }
    System.out.println(coin);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M= sc.nextInt();
    int coin=0;
    int Max=Math.max(N,M);
    int Min=Math.min(N,M);
    coin=Max;
    if(Max-1>Min){
      coin+=Max-1;
    }else{
      coin+=Min;
    }
    System.out.println(coin);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M= sc.nextInt(); M sc.nextInt() sc.nextInt sc int coin=0; coin 0 int Max=Math.max(N,M); Max Math.max(N,M) Math.max Math N M int Min=Math.min(N,M); Min Math.min(N,M) Math.min Math N M coin=Max coin Max if(Max-1>Min){
      coin+=Max-1;
    }else{
      coin+=Min;
    } Max-1>Min Max-1 Max 1 Min {
      coin+=Max-1;
    } coin+=Max-1 coin Max-1 Max 1 {
      coin+=Min;
    } coin+=Min coin Min System.out.println(coin) System.out.println System.out System System.out coin String[] args args public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M= sc.nextInt();
    int coin=0;
    int Max=Math.max(N,M);
    int Min=Math.min(N,M);
    coin=Max;
    if(Max-1>Min){
      coin+=Max-1;
    }else{
      coin+=Min;
    }
    System.out.println(coin);
  }} public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M= sc.nextInt();
    int coin=0;
    int Max=Math.max(N,M);
    int Min=Math.min(N,M);
    coin=Max;
    if(Max-1>Min){
      coin+=Max-1;
    }else{
      coin+=Min;
    }
    System.out.println(coin);
  }} Main
import java.util.*;

public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M= sc.nextInt();
    int coin=0;
    int Max=Math.max(N,M);
    int Min=Math.min(N,M);
    coin=Max;
    if(Max-1>Min){
      coin+=Max-1;
    }else{
      coin+=Min;
    }
    System.out.println(coin);
  }}