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

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

array.sortInPlace { (lhs, rhs) in
  return lhs < rhs
}

let min = array[0]
let result = n / min + 1 + 4
print(Int(result))
