program main
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int64):: n,m,d

    read*, n,m,d
    if (d==0) then
        print"(f20.15)", 1d0/dble(n)*dble(m-1)
    else
        print"(f20.15)", 2d0*(1d0/dble(n)-dble(d)/(dble(n))**2)*dble(m-1)
    end if
end program main