import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		String W = in.readLine();
		String[] Ws = W.split(" ");
		int[] Wi = {Integer.parseInt(Ws[0]),Integer.parseInt(Ws[1])};


		int coin =0;
			for(int i=0;i<2;i++){
			if(Wi[0]<=Wi[1]){
				coin += Wi[1];
				Wi[1]--;
			}else{
				coin += Wi[0];
				Wi[0]--;
			}
		}

		System.out.print(coin);

	}


} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		String W = in.readLine();
		String[] Ws = W.split(" ");
		int[] Wi = {Integer.parseInt(Ws[0]),Integer.parseInt(Ws[1])};


		int coin =0;
			for(int i=0;i<2;i++){
			if(Wi[0]<=Wi[1]){
				coin += Wi[1];
				Wi[1]--;
			}else{
				coin += Wi[0];
				Wi[0]--;
			}
		}

		System.out.print(coin);

	}


} Main public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		String W = in.readLine();
		String[] Ws = W.split(" ");
		int[] Wi = {Integer.parseInt(Ws[0]),Integer.parseInt(Ws[1])};


		int coin =0;
			for(int i=0;i<2;i++){
			if(Wi[0]<=Wi[1]){
				coin += Wi[1];
				Wi[1]--;
			}else{
				coin += Wi[0];
				Wi[0]--;
			}
		}

		System.out.print(coin);

	} main {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		String W = in.readLine();
		String[] Ws = W.split(" ");
		int[] Wi = {Integer.parseInt(Ws[0]),Integer.parseInt(Ws[1])};


		int coin =0;
			for(int i=0;i<2;i++){
			if(Wi[0]<=Wi[1]){
				coin += Wi[1];
				Wi[1]--;
			}else{
				coin += Wi[0];
				Wi[0]--;
			}
		}

		System.out.print(coin);

	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String W = in.readLine(); W in.readLine() in.readLine in String[] Ws = W.split(" "); Ws W.split(" ") W.split W " " int[] Wi = {Integer.parseInt(Ws[0]),Integer.parseInt(Ws[1])}; Wi {Integer.parseInt(Ws[0]),Integer.parseInt(Ws[1])} Integer.parseInt(Ws[0]) Integer.parseInt Integer Ws[0] Ws 0 Integer.parseInt(Ws[1]) Integer.parseInt Integer Ws[1] Ws 1 int coin =0; coin 0 for(int i=0;i<2;i++){
			if(Wi[0]<=Wi[1]){
				coin += Wi[1];
				Wi[1]--;
			}else{
				coin += Wi[0];
				Wi[0]--;
			}
		} int i=0; int i=0; i 0 i<2 i 2 i++ i++ i {
			if(Wi[0]<=Wi[1]){
				coin += Wi[1];
				Wi[1]--;
			}else{
				coin += Wi[0];
				Wi[0]--;
			}
		} {
			if(Wi[0]<=Wi[1]){
				coin += Wi[1];
				Wi[1]--;
			}else{
				coin += Wi[0];
				Wi[0]--;
			}
		} if(Wi[0]<=Wi[1]){
				coin += Wi[1];
				Wi[1]--;
			}else{
				coin += Wi[0];
				Wi[0]--;
			} Wi[0]<=Wi[1] Wi[0] Wi 0 Wi[1] Wi 1 {
				coin += Wi[1];
				Wi[1]--;
			} coin += Wi[1] coin Wi[1] Wi 1 Wi[1]-- Wi[1] Wi 1 {
				coin += Wi[0];
				Wi[0]--;
			} coin += Wi[0] coin Wi[0] Wi 0 Wi[0]-- Wi[0] Wi 0 System.out.print(coin) System.out.print System.out System System.out coin String[] args args public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		String W = in.readLine();
		String[] Ws = W.split(" ");
		int[] Wi = {Integer.parseInt(Ws[0]),Integer.parseInt(Ws[1])};


		int coin =0;
			for(int i=0;i<2;i++){
			if(Wi[0]<=Wi[1]){
				coin += Wi[1];
				Wi[1]--;
			}else{
				coin += Wi[0];
				Wi[0]--;
			}
		}

		System.out.print(coin);

	}


} public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		String W = in.readLine();
		String[] Ws = W.split(" ");
		int[] Wi = {Integer.parseInt(Ws[0]),Integer.parseInt(Ws[1])};


		int coin =0;
			for(int i=0;i<2;i++){
			if(Wi[0]<=Wi[1]){
				coin += Wi[1];
				Wi[1]--;
			}else{
				coin += Wi[0];
				Wi[0]--;
			}
		}

		System.out.print(coin);

	}


} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		String W = in.readLine();
		String[] Ws = W.split(" ");
		int[] Wi = {Integer.parseInt(Ws[0]),Integer.parseInt(Ws[1])};


		int coin =0;
			for(int i=0;i<2;i++){
			if(Wi[0]<=Wi[1]){
				coin += Wi[1];
				Wi[1]--;
			}else{
				coin += Wi[0];
				Wi[0]--;
			}
		}

		System.out.print(coin);

	}


}
