program name
    implicit none
    integer(4):: a,b
    integer(4):: i,ans

    read*, a,b

    ans=0

    do i=1,2
        if (a >= b) then
            ans=ans+a
            a=a-1
        else
            ans=ans+b
            b=b-1
        end if
    end do

    print*, ans
end program name