number = gets.to_i
vehicle = [ ]
vehicle.push gets.to_i # densha
vehicle.push gets.to_i # basu
vehicle.push gets.to_i # takusi-
vehicle.push gets.to_i # hikouki
vehicle.push gets.to_i # hune

max = 0

vehicle.each_index do |i|
  m = number / vehicle[i]
  r = number % vehicle[i]
  sum = m + (r==0 ? 0 : 1)
  if max < sum
    max = sum
  end
end

p( max + vehicle.size - 1 )
