import Foundation


func readStr() -> String {
  return readLine()!
}

func readInt() -> Int {
    return Int(readLine()!)!
}

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readTwoInts() -> (a: Int, b: Int) {
    let ints = readLine()!.split(separator: " ").map { Int($0)! }
    return (a: ints[0], b: ints[1])
}

var (N, X) = readTwoInts()
var mn = 10000000087
for _ in 0..<4 {
    let m = readInt()
    X -= m
    mn = min(mn, m)
}

if X >= mn {
    N += X / mn
    print(N)
} else {
    print(N)
}


