a,b=mint() print(min(2*min(a,b),a+b-1))