import java.util.*;
class Main{
    public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
        int A = stdIn.nextInt();
	int B = stdIn.nextInt();
	int k =A+A-1;
	if(A==B){
	    k=A+B;
	}
	if(A<B){
	    k=B+B-1;
	}
	System.out.println(k);
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
        int A = stdIn.nextInt();
	int B = stdIn.nextInt();
	int k =A+A-1;
	if(A==B){
	    k=A+B;
	}
	if(A<B){
	    k=B+B-1;
	}
	System.out.println(k);
    }
} Main public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
        int A = stdIn.nextInt();
	int B = stdIn.nextInt();
	int k =A+A-1;
	if(A==B){
	    k=A+B;
	}
	if(A<B){
	    k=B+B-1;
	}
	System.out.println(k);
    } main {
	Scanner stdIn = new Scanner(System.in);
        int A = stdIn.nextInt();
	int B = stdIn.nextInt();
	int k =A+A-1;
	if(A==B){
	    k=A+B;
	}
	if(A<B){
	    k=B+B-1;
	}
	System.out.println(k);
    } 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 int k =A+A-1; k A+A-1 A+A A A 1 if(A==B){
	    k=A+B;
	} A==B A B {
	    k=A+B;
	} k=A+B k A+B A B if(A<B){
	    k=B+B-1;
	} A<B A B {
	    k=B+B-1;
	} k=B+B-1 k B+B-1 B+B B B 1 System.out.println(k) System.out.println System.out System System.out k String[] args args
import java.util.*;
class Main{
    public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
        int A = stdIn.nextInt();
	int B = stdIn.nextInt();
	int k =A+A-1;
	if(A==B){
	    k=A+B;
	}
	if(A<B){
	    k=B+B-1;
	}
	System.out.println(k);
    }
}
