function Main(input) {
	tmp = input.split(" ");
	
	var a = parseInt(tmp[0]);
	var b = parseInt(tmp[1]);
	var r = 0;
	var rt = 0;
	r+=a;a--;
	r+=a;
	
	var a = parseInt(tmp[0]);
	var b = parseInt(tmp[1]);
	rt+=a;
	rt+=b;
	if(r<rt){
		r=rt;
	}
	rt = 0;
	
	rt+=b;
	rt+=a;
	if(r<rt){
		r=rt;
	}
	rt = 0;
	
	rt+=b;b--;
	rt+=b;
	if(r<rt){
		r=rt;
	}
	
	console.log(r);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));