unittest
{
	assert( [ "5 3" ].parse.expand.solve == 9 );
	assert( [ "3 4" ].parse.expand.solve == 7 );
	assert( [ "6 6" ].parse.expand.solve == 12 );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto ab = input.front.split.to!( long[] );
	return tuple( ab[ 0 ], ab[ 1 ] );
}

auto solve( long a, long b )
{
	if(      b < a ) return a + a - 1;
	else if( a < b ) return b + b - 1;
	else             return a + b;
}
