program main
    implicit none

    integer music_value,money,max_count

    read(*,*) music_value, money, max_count

    if (max_count < int(money/music_value)) then 
        write(*,"(I0)") max_count
    else
        write(*,"(I0)") int(money/music_value)
    end if
end program main