let n = Int(readLine()!)!
var array: [Int] = []

for _ in 0..<5 {
  let item = Int(readLine()!)!
  array.append(item)
}

var min = array[0]
for i in 1..<5 {
  let item = array[i]
  if item < min {
    min = item
  }
}

let a = n / min
if n % min == 0 {
  print(a+4)
} else {
  print(a+1+4)
}
