import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int total = 0;
		if(a>b) {
			total+=a;
			if(a-1>b)total+=a-1;
			else total+=b;
		}
		else{
			total+=b;
			if(b-1>a)total+=b-1;
			else total+=a;
		}
		
		System.out.println(total);
	}		
} import java.util.Scanner; Scanner 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 total = 0;
		if(a>b) {
			total+=a;
			if(a-1>b)total+=a-1;
			else total+=b;
		}
		else{
			total+=b;
			if(b-1>a)total+=b-1;
			else total+=a;
		}
		
		System.out.println(total);
	}		
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int total = 0;
		if(a>b) {
			total+=a;
			if(a-1>b)total+=a-1;
			else total+=b;
		}
		else{
			total+=b;
			if(b-1>a)total+=b-1;
			else total+=a;
		}
		
		System.out.println(total);
	} main {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int total = 0;
		if(a>b) {
			total+=a;
			if(a-1>b)total+=a-1;
			else total+=b;
		}
		else{
			total+=b;
			if(b-1>a)total+=b-1;
			else total+=a;
		}
		
		System.out.println(total);
	} 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 total = 0; total 0 if(a>b) {
			total+=a;
			if(a-1>b)total+=a-1;
			else total+=b;
		}
		else{
			total+=b;
			if(b-1>a)total+=b-1;
			else total+=a;
		} a>b a b {
			total+=a;
			if(a-1>b)total+=a-1;
			else total+=b;
		} total+=a total a if(a-1>b)total+=a-1;
			else total+=b; a-1>b a-1 a 1 b total+=a-1 total a-1 a 1 total+=b total b {
			total+=b;
			if(b-1>a)total+=b-1;
			else total+=a;
		} total+=b total b if(b-1>a)total+=b-1;
			else total+=a; b-1>a b-1 b 1 a total+=b-1 total b-1 b 1 total+=a total a System.out.println(total) System.out.println System.out System System.out total 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 total = 0;
		if(a>b) {
			total+=a;
			if(a-1>b)total+=a-1;
			else total+=b;
		}
		else{
			total+=b;
			if(b-1>a)total+=b-1;
			else total+=a;
		}
		
		System.out.println(total);
	}		
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int total = 0;
		if(a>b) {
			total+=a;
			if(a-1>b)total+=a-1;
			else total+=b;
		}
		else{
			total+=b;
			if(b-1>a)total+=b-1;
			else total+=a;
		}
		
		System.out.println(total);
	}		
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int total = 0;
		if(a>b) {
			total+=a;
			if(a-1>b)total+=a-1;
			else total+=b;
		}
		else{
			total+=b;
			if(b-1>a)total+=b-1;
			else total+=a;
		}
		
		System.out.println(total);
	}		
}