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

for _ in 1..<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 result = n / min + 1 + 4
print(result)
