L = gets.to_i
A = gets.to_i
B = gets.to_i
C = gets.to_i
D = gets.to_i

res = 0
kokugo = 0
sansu = 0
done = false
L.times do |l|
    if kokugo >= A && sansu >= B then
        done = true
    else
        if kokugo < A then
            kokugo += C
        end
        if sansu < B then
            sansu += D
        end
        done = false
    end
    if done then
        res += 1
    end
end
puts res
