import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	int n = a + b;
      	int m = a + a - 1;
      	int o = b + b - 1;
      	int ans = n;
      	if(n < m){
        	ans = m;
			if(m < o){
            	ans = o;
            }
        }
      	else {
        	if(n < o){
            	ans = o;
            }
        }
      	System.out.print(ans);
    
    }
 
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	int n = a + b;
      	int m = a + a - 1;
      	int o = b + b - 1;
      	int ans = n;
      	if(n < m){
        	ans = m;
			if(m < o){
            	ans = o;
            }
        }
      	else {
        	if(n < o){
            	ans = o;
            }
        }
      	System.out.print(ans);
    
    }
 
} Main public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	int n = a + b;
      	int m = a + a - 1;
      	int o = b + b - 1;
      	int ans = n;
      	if(n < m){
        	ans = m;
			if(m < o){
            	ans = o;
            }
        }
      	else {
        	if(n < o){
            	ans = o;
            }
        }
      	System.out.print(ans);
    
    } main {
    	Scanner scan = new Scanner(System.in);
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	int n = a + b;
      	int m = a + a - 1;
      	int o = b + b - 1;
      	int ans = n;
      	if(n < m){
        	ans = m;
			if(m < o){
            	ans = o;
            }
        }
      	else {
        	if(n < o){
            	ans = o;
            }
        }
      	System.out.print(ans);
    
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int n = a + b; n a + b a b int m = a + a - 1; m a + a - 1 a + a a a 1 int o = b + b - 1; o b + b - 1 b + b b b 1 int ans = n; ans n if(n < m){
        	ans = m;
			if(m < o){
            	ans = o;
            }
        }
      	else {
        	if(n < o){
            	ans = o;
            }
        } n < m n m {
        	ans = m;
			if(m < o){
            	ans = o;
            }
        } ans = m ans m if(m < o){
            	ans = o;
            } m < o m o {
            	ans = o;
            } ans = o ans o {
        	if(n < o){
            	ans = o;
            }
        } if(n < o){
            	ans = o;
            } n < o n o {
            	ans = o;
            } ans = o ans o System.out.print(ans) System.out.print System.out System System.out ans String[] args args public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	int n = a + b;
      	int m = a + a - 1;
      	int o = b + b - 1;
      	int ans = n;
      	if(n < m){
        	ans = m;
			if(m < o){
            	ans = o;
            }
        }
      	else {
        	if(n < o){
            	ans = o;
            }
        }
      	System.out.print(ans);
    
    }
 
} public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	int n = a + b;
      	int m = a + a - 1;
      	int o = b + b - 1;
      	int ans = n;
      	if(n < m){
        	ans = m;
			if(m < o){
            	ans = o;
            }
        }
      	else {
        	if(n < o){
            	ans = o;
            }
        }
      	System.out.print(ans);
    
    }
 
} Main
import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	int n = a + b;
      	int m = a + a - 1;
      	int o = b + b - 1;
      	int ans = n;
      	if(n < m){
        	ans = m;
			if(m < o){
            	ans = o;
            }
        }
      	else {
        	if(n < o){
            	ans = o;
            }
        }
      	System.out.print(ans);
    
    }
 
}