# -*- coding: utf-8 -*-

import sys

import numpy as np



def get_num():

    return int(eval(input()))





def get_nums(n):

    res = [0 for _ in range(n)]

    for i in range(n):

        res[i] = int(eval(input()))

    return res





def get_numbers():

    return list(map(int, input().split()))





n = get_num()

costs = get_nums(5)



max_time = 0

for cost in costs:

    max_time = max(max_time, int(np.ceil(n / cost)))



print((max_time + 4))
# -*- coding: utf-8 -*-

import sys

import math



def get_num():

    return int(eval(input()))





def get_nums(n):

    res = [0 for _ in range(n)]

    for i in range(n):

        res[i] = int(eval(input()))

    return res





def get_numbers():

    return list(map(int, input().split()))





n = get_num()

costs = get_nums(5)



max_time = 0

for cost in costs:

    max_time = max(max_time, int(math.ceil(n / cost)))



print((max_time + 4))
# -*- coding: utf-8 -*-
import sys
import numpy as np


def get_num():
    return int(eval(input()))


def get_nums(n):
    res = [0 for _ in range(n)]
    for i in range(n):
        res[i] = int(eval(input()))
    return res


def get_numbers():
    return list(map(int, input().split()))


n = get_num()
costs = get_nums(5)
max_time = 0
for cost in costs:
    max_time = max(max_time, int(np.ceil(n / cost)))
print((max_time + 4))

# -*- coding: utf-8 -*-
import sys
import math


def get_num():
    return int(eval(input()))


def get_nums(n):
    res = [0 for _ in range(n)]
    for i in range(n):
        res[i] = int(eval(input()))
    return res


def get_numbers():
    return list(map(int, input().split()))


n = get_num()
costs = get_nums(5)
max_time = 0
for cost in costs:
    max_time = max(max_time, int(math.ceil(n / cost)))
print((max_time + 4))

-import numpy as np +import math -    max_time = max(max_time, int(np.ceil(n / cost))) +    max_time = max(max_time, int(math.ceil(n / cost)))