program main
  implicit none
  integer :: A,B,out
  integer :: i
  read(*,*) A,B
  out = 0
  do i=1,2
     if (A>B) then
        out=out+A
        A=A-1
     else
        out=out+B
        B=B-1
     end if
  end do
  write(*,'(i0)') out
end program main