def main():

    N = int(eval(input()))

    T = [int(eval(input())) for i in range(5)]

    minT = min(T)

    bo = (N + minT - 1)//minT

    print((4+bo))





if __name__ == '__main__':

    main()

def main():

    N = int(eval(input()))

    A = [int(eval(input())) for i in range(5)]

    print((0--N//min(A) + 4))





if __name__ == '__main__':

    main()

def main():
    N = int(eval(input()))
    T = [int(eval(input())) for i in range(5)]
    minT = min(T)
    bo = (N + minT - 1) // minT
    print((4 + bo))


if __name__ == "__main__":
    main()

def main():
    N = int(eval(input()))
    A = [int(eval(input())) for i in range(5)]
    print((0 - -N // min(A) + 4))


if __name__ == "__main__":
    main()

-    T = [int(eval(input())) for i in range(5)] -    minT = min(T) -    bo = (N + minT - 1) // minT -    print((4 + bo)) +    A = [int(eval(input())) for i in range(5)] +    print((0 - -N // min(A) + 4))