holiday = $stdin.gets.to_i
japanesePage = $stdin.gets.to_i
mathPage = $stdin.gets.to_i
japanesePagePerDay = $stdin.gets.to_i
mathPagePerDay = $stdin.gets.to_i

puts holiday - [(japanesePage.to_f / japanesePagePerDay.to_f).ceil, (mathPage.to_f / mathPagePerDay.to_f).ceil].max