arr = Array.new(6, 0)
ans = 0
arr.size.times do |i|
	arr[i] = gets.to_i
	
end
(1..5).each do |j|
	num = arr[0] / arr[j]
	if arr[0] % arr[j] == 0
		num -= 1
	end
	
	if ans <= num
		ans = num
	end	
end
puts ans + 5