Problem:
 Score: 300 points    Problem Statement  In 2028 and after a continuous growth, AtCoder Inc. finally built an empire with six cities (City 1, 2, 3, 4, 5, 6 )!  There are five means of transport in this empire:   Train: travels from City 1 to 2 in one minute. A train can occupy at most A people.  Bus: travels from City 2 to 3 in one minute. A bus can occupy at most B people.  Taxi: travels from City 3 to 4 in one minute. A taxi can occupy at most C people.  Airplane: travels from City 4 to 5 in one minute. An airplane can occupy at most D people.  Ship: travels from City 5 to 6 in one minute. A ship can occupy at most E people.   For each of them, one vehicle leaves the city at each integer time (time 0 , 1 , 2 , ... ).  There is a group of N people at City 1 , and they all want to go to City 6 . At least how long does it take for all of them to reach there? 
You can ignore the time needed to transfer.      Constraints   1 \leq N, A, B, C, D, E \leq 10^{15}  All values in input are integers.         Input  Input is given from Standard Input in the following format:  N  A  B  C  D  E       Output  Print the minimum time required for all of the people to reach City 6 , in minutes.        Sample Input 1 5
3
2
4
3
5      Sample Output 1 7  One possible way to travel is as follows.
First, there are N = 5 people at City 1 , as shown in the following image:   In the first minute, three people travels from City 1 to City 2 by train. Note that a train can only occupy at most three people.   In the second minute, the remaining two people travels from City 1 to City 2 by train, and two of the three people who were already at City 2 travels to City 3 by bus. Note that a bus can only occupy at most two people.   In the third minute, two people travels from City 2 to City 3 by train, and another two people travels from City 3 to City 4 by taxi.   From then on, if they continue traveling without stopping until they reach City 6 , all of them can reach there in seven minutes. There is no way for them to reach City 6 in 6 minutes or less.       Sample Input 2 10
123
123
123
123
123      Sample Output 2 5  All kinds of vehicles can occupy N = 10 people at a time.
Thus, if they continue traveling without stopping until they reach City 6 , all of them can reach there in five minutes.       Sample Input 3 10000000007
2
3
5
7
11      Sample Output 3 5000000008  Note that the input or output may not fit into a 32 -bit integer type.

Solution (Python):
N = int(input())
L = [int(input()) for _ in range(5)]

m = min(L)
print(4 + (N+m-1)//m)

Solution (Python):
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

m = min(a,b,c,d,e)
t = 4
if n % m ==0:
    t += n//m
else:
    t += n//m + 1
print(t)

Solution (Python):
import math
import fractions
import copy
import numpy as np
def j(q):
    if q==1: print("YES")
    elif q == 0:print("NO")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def printrow(a):
    for i in a:
        print(i)
"""

def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
"""
n = ip()
a = []
for i in range(5):
    a.append(ip())
if min(a)>=n:
    print(5)
    exit(0)
ans = n//min(a)
if n%min(a):
    ans+=1
print(ans+4)

Solution (Python):
n=int(input())
x=list(int(input()) for _ in range(5))

mn=min(x)

if n%mn==0:
	res=n//mn+4
else:
	res=n//mn+5

print(res)

Solution (Python):
from math import ceil
n,a,b,c,d,e = [int(input()) for _ in range(6)]
k = min(a,b,c,d,e)
print(ceil(n/k)+4)

Solution (Python):
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

m = min(a,b,c,d,e)

ans = 5 + (n - 1) // m

print(ans)

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


def main():
	n = int(input())
	a = int(input())
	b = int(input())
	c = int(input())
	d = int(input())
	e = int(input())
	print(math.ceil(n/min([a,b,c,d,e]))+4)

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Solution (Python):
def main46():
    n = int(input())
    ae = []
    for i in range(5):
        ae.append(int(input()))
    ae.sort()
    keynum = 5 + int((n - 1) / ae[0])
    print(keynum)

if __name__ == "__main__":
    main46()

Solution (Python):
import math
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

f = min(a, b, c, d, e)
if n % f == 0:
    print(n // f - 1 + 5)
else:
    print(n // f + 5)

Solution (Python):
import math
n=int(input())
li=[int(input()) for _ in range(5)]
print(math.ceil(n/min(li))+4)

Solution (Python):
import math

n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

num=math.ceil(n/(min(a,b,c,d,e)))
print(num+4)

Solution (Python):
import sys
input = sys.stdin.readline

def main():
	n = int(input().strip())
	s = [0] * 5
	for i in range(5):
		s[i] = int(input().strip())
	m = min(s)
	if n % m == 0:
		print(n // m + 4)
	else:
		print(n // m + 5)

if __name__ == '__main__':
	main()

Solution (Python):
N = int(input())
ts = []
for _ in range(5):
  ts.append(int(input()))

print(4 + max([((N + x - 1) // x) for x in ts]))

Solution (Python):


import sys

n = int(input())

minn = int(input())
minn = min(minn,int(input()))
minn = min(minn,int(input()))
minn = min(minn,int(input()))
minn = min(minn,int(input()))



print(((n-1)//minn)+5)

Solution (Python):

N = int(input())
T = [int(input()) for _ in range(5)]

import math

T_min = min(T)
cost = math.ceil(N/T_min) + 4
print(cost)

Solution (Python):

import sys
import math

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


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


def get_numbers():
    return 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)

Solution (Python):

import sys
import numpy as np

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


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


def get_numbers():
    return 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)

Solution (Python):
"""


 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  


a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654


char_list = list("abcd") 
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    n = int(sys.stdin.readline())
    a = int(sys.stdin.readline())
    b = int(sys.stdin.readline())
    c = int(sys.stdin.readline())
    d = int(sys.stdin.readline())
    e = int(sys.stdin.readline())

    ans = -(-n//min(a,b,c,d,e)) + 4

    print(ans)

Solution (Python):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

bot = min(A,B,C,D,E)
print((N-1)//bot+1+4)

Solution (Python):
import math
ninzuu = int(input())
norimono = []

for i in range(5):
    norimono.append(int(input()))

min_n = min(norimono)
a = math.ceil(ninzuu / min_n)
a = a + 4
print(a)

Solution (Python):
N = int(input())
transportations = []

for _ in range(5):
    transportation = int(input())
    transportations.append(transportation)

transportations.sort()
print(-(-N // transportations[0]) + 4)

Solution (Python):
import math

n = int(input())

m = 10 ** 15 + 1

for _ in range(5):
  m = min(m, int(input()))

print(math.ceil(n / m) + 5 - 1)

Solution (Python):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

list1 = [A,B,C,D,E]
min1 = min(list1)
if N % min1 != 0:
  ans = N//min1 + 5
else:
  ans = N//min1 + 4

print(ans)

Solution (Python):
import math
N = int(input())
t = min([int(input()) for _ in range(5)])
print(math.ceil(N/t)+4)

Solution (Python):
N = int(input())
C = []
for _ in range(5):
    C.append(int(input()))

min_c = min(C)
print((N+min_c-1) // min_c + 4)

Solution (Python):
a = int(input())
b = [int(input()) for _ in range(5)]
b.sort()
print(((a + b[0] - 1) // b[0]) + 4)

Solution (Python):
arr = [int(input()) for i in range(6)]
n = arr[0]
a = min(arr)
ans = 4 + (n+a-1)//a
print(ans)

Solution (Python):
import math
N = int(input())
neck = int(input())
for i in range(4):
  neck = min(neck, int(input()))
res = math.ceil(N/neck)
print(res + 4)

Solution (Python):


n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

neck = min(a, b, c, d, e)

time = n // neck
time += 1 if n % neck != 0 else 0

print(time + 4)

Solution (Python):
N=int(input())
X=[int(input()) for _ in range(5)]
print(-(-N//min(X))+4)

Solution (Python):
import math

n = int(input())
k = []
for i in range(5):
    k.append(int(input()))
print(math.ceil(n / min(k)) + 4)

Solution (Python):
import math
N = int(input())
nums = [int(input()) for _ in range(5)]
print(math.ceil(N / min((nums))) + 4)

Solution (Python):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
print(int((N - 1) / min(A, B, C, D, E)) + 5)

Solution (Python):
a = int(input())
b = 10 ** 16
for i in range(5):
    b = min(b, int(input()))
print((a + b - 1) // b + 4)

Solution (Python):
import math

N = int(input())
tr = []

for i in range(5):
  tr.append(int(input()))
            
print(math.ceil(N / min(tr))+4)

Solution (Python):
import math

N = int(input())
A = []
for i in range(5):
    a = int(input())
    A.append(a)

neck = min(A)

print(math.ceil(N/neck)+4)

Solution (Python):
import math
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
mmin = min(a, b, c, d, e)
print(4 + math.ceil(n / mmin))

Solution (Python):
import numpy as np
n = int(input())
a= int(input())
b= int(input())
c= int(input())
d= int(input())
e= int(input())

l = [a,b,c,d,e]
m = min(l)

if n <= m:
    print(5)
else:
    if n%m == 0:
        print(int(n/m)+4)
    else:
        print(int(n/m)+5)

Solution (Python):
import math
n = int(input())
a = [int(input()) for i in range(5)]
print(4 + math.ceil(n/min(a)))

Solution (Python):
import math

n = int(input())
abcde = [int(input()) for _ in range(5)]

mi = min(abcde)

if mi>=n:
    print(5)
else:
    print(math.ceil(n/mi)+4)

Solution (Python):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

min = N
if min > A: min = A
if min > B: min = B
if min > C: min = C
if min > D: min = D
if min > E: min = E

print(4 - (- N // min))

Solution (Python):
import math
n =int(input())
a = [int(input()) for _ in range(5)]
if min(a)<n: 
  print(math.ceil(n/min(a))+len(a)-1)
else:
  print(len(a))

Solution (Python):
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
m = min(a,b,c,d,e)
ret = 5 + n//m
if n%m==0 : ret-=1
print(ret)

Solution (Python):
N = int(input())
cost = [int(input()) for _ in range(5)]
mn = min(cost)
n = N // min(cost)
if N % mn == 0:
    print(n + 4)
else:
    print(n + 5)

Solution (Python):
n=int(input())
v=[int(input()) for i in range(5)]

if n%min(v)==0:
    a=n//min(v)
elif n<=min(v):
    print(5)
    exit()
else:
    a=n//min(v)+1
print(a+4)

Solution (Python):
import math

n_paths = 5
N = int(input())
ABCDE = [int(input()) for _ in range(n_paths)]

bottleneck = min(ABCDE)
n_addition = math.ceil(N / bottleneck) - 1
print(n_paths + n_addition)

Solution (Python):
import math

N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

bottleneck = min([A, B, C, D, E])
n_addition = math.ceil(N / bottleneck) - 1
print(5 + n_addition)

Solution (Python):
import sys
import math
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    transpotation = [
        int(inputs[1]),
        int(inputs[2]),
        int(inputs[3]),
        int(inputs[4]),
        int(inputs[5])
    ]

    bottleneck = 0

    for t in transpotation:
        if bottleneck == 0 or t < bottleneck:
            bottleneck = t
    power_bottleneck = math.ceil(N / bottleneck)
    return power_bottleneck + 4


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(6))
    print(ret)

Solution (Python):
import math

n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

m = min(a, b, c, d, e)
ans = math.ceil(n / m) + 4
print(ans)

Solution (Python):
from math import ceil

n = int(input())
a = [int(input()) for _ in range(5)]

print(ceil(n / min(a)) + 4)

Solution (Python):
N = int(input())
lst = []
for i in range(0, 5):
	lst.append(int(input()))
lst.sort()
ans = N // lst[0] + 4
if N % lst[0] != 0:
	ans += 1
print(ans)

Solution (Python):
N = int(input())
cities = [int(input()) for i in range(5)]

min_city = min(cities)
if N <= min_city:
  print(5)
else:
  times = N//min_city
  if N%min_city == 0:
    print(5+times-1)
  else:
    print(5+times)

Solution (Python):
ri = lambda: int(input())
n = ri()
x = min([ri() for _ in range(5)])
print(n//x+min(1,n%x)+4)

Solution (Python):
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
l = [a, b, c, d, e]
l_m = min(l)

if (n/l_m)%1 == 0:
    print(4+int(n/l_m))
else:
    print(5+int(n/l_m))

Solution (Python):
import math

N = int(input())
limits = [int(input()) for _ in range(5)]

print(math.ceil(N / min(limits) + 4))

Solution (Python):
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())

capacity=min([A,B,C,D,E])

print(N//capacity+int(N%capacity!=0)+4)

Solution (Python):
import math
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

x = min(a,b,c,d,e)
ans = math.ceil(n/x) + 4
print(ans)

Solution (Python):
import math
n=int(input())
num=[]
for _ in range(5):
  x=int(input())
  num.append(x)
print(4+math.ceil(n/min(num)))

Solution (Python):
def main():
    n = int(input())
    d = [int(input()) for _ in range(5)]

    max_wait = max([(n + a - 1) // a for a in d])
    print(max_wait + 4)


main()

Solution (Python):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def ceil(a,b) :
    return (a + b - 1) // b

time =[A , B , C , D , E]
time.sort()

minTime = time[0]

ans = ceil(N,minTime) + 4

print(ans)

Solution (Python):
n = int(raw_input())
a = int(raw_input())
b = int(raw_input())
c = int(raw_input())
d = int(raw_input())
e = int(raw_input())

bottle_neck = min([a, b, c, d, e]) 
extra = (n-1)/bottle_neck
print 5 + extra

Solution (Python):



""" convenient functions




"""

import sys
sys.setrecursionlimit(10**7)
from itertools import accumulate, combinations, permutations, product 

from math import factorial, ceil, floor
def factorize(n):
    """return the factors of the Arg and count of each factor
    
    Args:
        n (long): number to be resolved into factors
    
    Returns:
        list of tuples: factorize(220) returns [(2, 2), (5, 1), (11, 1)]
    """
    fct = []  
    b, e = 2, 0  
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct
def combinations_count(n, r):
    """Return the number of selecting r pieces of items from n kinds of items.
    
    Args:
        n (long): number
        r (long): number
    
    Raises:
        Exception: not defined when n or r is negative
    
    Returns:
        long: number
    """
    
    if n < 0 or r < 0:
        raise Exception('combinations_count(n, r) not defined when n or r is negative')
    if n - r < r: r = n - r
    if r < 0: return 0
    if r == 0: return 1
    if r == 1: return n
    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]
    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot
    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])
    return result
def combinations_with_replacement_count(n, r):
    """Return the number of selecting r pieces of items from n kinds of items allowing individual elements to be repeated more than once.
    
    Args:
        n (long): number
        r (long): number
    
    Raises:
        Exception: not defined when n or r is negative
    
    Returns:
        long: number
    """
    if n < 0 or r < 0:
        raise Exception('combinations_with_replacement_count(n, r) not defined when n or r is negative')
    elif n == 0:
        return 1
    else:
        return combinations_count(n + r - 1, r)
from bisect import bisect_left, bisect_right
from collections import deque, Counter, defaultdict 
from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest 
from copy import deepcopy, copy 
from operator import itemgetter


from functools import reduce
def chmin(x, y):
    """change minimum
    if x > y, x = y and return (x, True).
    convenient when solving problems of dp[i]
    
    Args:
        x (long): current minimum value
        y (long): potential minimum value
    
    Returns:
        (x, bool): (x, True) when updated, else (x, False)
    """
    if x > y:
        x = y
        return (x, True)
    else:
        return (x, False)
def chmax(x, y):
    """change maximum
    if x < y, x = y and return (x, True).
    convenient when solving problems of dp[i]
    
    Args:
        x (long): current maximum value
        y (long): potential maximum value
    
    Returns:
        (x, bool): (x, True) when updated, else (x, False)
    """
    if x < y:
        x = y
        return (x, True)
    else:
        return (x, False)

from fractions import gcd 
def gcds(numbers):
    return reduce(gcd, numbers)
def lcm(x, y):
    return (x * y) // gcd(x, y)
def lcms(numbers):
    return reduce(lcm, numbers, 1)



INF = 10 ** 18
MOD = 10 ** 9 + 7
modpow = lambda a, n, p = MOD: pow(a, n, p) 
def modinv(a, p = MOD):
    
    
    return modpow(a, p-2, p)
def modinv_list(n, p = MOD):
    if n <= 1:
        return [0,1][:n+1]
    else:
        inv_t = [0,1]
        for i in range(2, n+1):
            inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
        return inv_t
def modfactorial_list(n, p = MOD):
    if n == 0:
        return [1]
    else:
        l = [0] * (n+1)
        tmp = 1
        for i in range(1, n+1):
            tmp = tmp * i % p
            l[i] = tmp
        return l
def modcomb(n, k, fac_list = [], p = MOD):
    
    
    from math import factorial
    if n < 0 or k < 0 or n < k: return 0
    if n == 0 or k == 0: return 1
    if len(fac_list) <= n:
        a = factorial(n) % p
        b = factorial(k) % p
        c = factorial(n-k) % p
    else:
        a = fac_list[n]
        b = fac_list[k]
        c = fac_list[n-k]
    return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
def modadd(a, b, p = MOD):
    return (a + b) % MOD
def modsub(a, b, p = MOD):
    return (a - b) % p
def modmul(a, b, p = MOD):
    return ((a % p) * (b % p)) % p
def moddiv(a, b, p = MOD):
    return modmul(a, modpow(b, p-2, p))

""" initialize variables and set inputs

    
    

    
    
    
    
    

    
    
    
    

    
    
"""


r = lambda: sys.stdin.readline().strip()
r_int = lambda: int(r())
R = lambda: list(map(int, r().split()))
Rfloat = lambda: list(map(float, r().split()))
Rtuple = lambda: tuple(map(int, r().split()))
Rmap = lambda: map(int, r().split())

""" how to treat input







"""




N = int(r())
ABCDE = [int(r()) for _ in range(5)]
time, block = 0, N
q, mod = divmod(N, min(ABCDE))
if mod != 0:
    q += 1
print(q+4)




        



"""memo: how to use defaultdict of list

Dic = defaultdict(list)

Dic[x].append(y)

for k, v in Dic.items():
"""

Solution (Python):
import sys
import fractions

input = sys.stdin.readline


def main():
    N = int(input())
    s = [int(input()) for i in range(5)]

    m = fractions.math.ceil(N/min(s))
    if m == 1:
        print(5)
    else:
        print(m+4)


if __name__ == "__main__":
    main()

Solution (Python):
def resolve():
	n=int(input())
	a=[int(input()) for i in range(5)]
	mx=min(a)
	if n%mx==0:
		print(n//mx+4)
	else:
		print(n//mx+5)
resolve()

Solution (Python):
a = [int(input())for _ in range(6)]
print(
    max(
        (a[0] + a[1] - 1) // a[1]
        , (a[0] + a[2] - 1) // a[2]
        , (a[0] + a[3] - 1) // a[3]
        , (a[0] + a[4] - 1) // a[4]
        , (a[0] + a[5] - 1) // a[5]
    ) + 4
)

Solution (Python):
def main():

    capa = []
    n = int(raw_input())
    ans = 0

    for i in range(5):
        capa.append(int(raw_input()))
    sorted_capa = sorted(capa)
    if n % sorted_capa[0] == 0:
        ans = 4 + n//sorted_capa[0]
    else:
        ans = 4 + n//sorted_capa[0] + 1
    print(ans)
    """
    people = [n]
    for i in range(5):
        people.append(0)
    print(capa,people)
    while people[-1] < n:
        for i in reversed(range(0,6)):
            if i != 0:
                people[i] += min(people[i-1],capa[i-1])
                people[i-1] -= min(people[i-1],capa[i-1])
        time += 1
        print(people,time)
    print(time)

    """
if __name__ == "__main__":
    main()

Solution (Python):
N=int(input())
T=list(int(input()) for _ in range(5))

minT=min(T)
minTidx=T.index(minT)
print(-(-N//min(T))+4)

Solution (Python):
import math
n, a, b, c, d, e = [int(input()) for i in range(6)]

print(math.ceil(n /min(a, b, c, d, e)) + 4)

Solution (Python):
import math
n = int(input())
abcde = [int(input()) for _ in range(5)]

print(math.ceil(n/min(abcde)) + 4)

Solution (Python):
n = int(input())
l = [int(input()) for i in range(5)]

if n <= min(l):
  print('5')
else:
  if n%min(l) == 0:
    print(5+n//min(l)-1)
  else:
    print(5+n//min(l))

Solution (Python):
import math
N = int(input())

numbers = [int(input()) for i in range(5)]
print(4+math.ceil(N/min(numbers)))

Solution (Python):
from math import ceil

n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

min_capacity = min(a, b, c, d, e)
print(ceil(n / min_capacity) + 4)

Solution (Python):
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
_min = min(A,B,C,D,E)
d = N // _min
if N % _min != 0:
    d += 1
print(d + 4)

Solution (Python):
import math
N,A,B,C,D,E = int(input()),int(input()),int(input()),int(input()),int(input()),int(input())
print(math.ceil(N/min(A,B,C,D,E)+4))

Solution (Python):
transport = [0]*5
N = int(input())
for i in range(5):  
    transport[i] = [0]*2
    transport[i][1], transport[i][0] = i, int(input())

transport = sorted(transport)
if N % transport[0][0] == 0:
    time = N // transport[0][0]
else:
    time = N // transport[0][0] + 1
time += 4  
print("{}".format(time))

Solution (Python):
transport = [0]*5
N = int(input())
for i in range(5):
    transport[i] = [0]*2
    transport[i][1], transport[i][0] = i, int(input())

transport = sorted(transport)
if N % transport[0][0] == 0:
    time = N // transport[0][0]
else:
    time = N // transport[0][0] + 1
time +=4
print("{}".format(time))

Solution (Python):
n=int(input())
t=[int(input()) for _ in range(5)]
print(-(-n//min(t))+4)

Solution (Python):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
ls = [A,B,C,D,E]
X = min((A,B,C,D,E))
s=N//X
if N%X==0:
  s-=1
print(s+5)

Solution (Python):

a = [float(input()) for i in range(6)]

limit = []
for i in range(5):
    limit.append(a[i + 1])

neck = min(limit)

if a[0] % neck == 0:
    ans = a[0] // neck + 4
else:
    ans = a[0] // neck + 5


print(int(ans))

Solution (Python):
N = int(input())
p = [int(input()) for _ in range(5)]
print(-(-N//min(p))+4)

Solution (Python):
import math
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
print(math.ceil(N / min(A,B,C,D,E))+4)

Solution (Python):
import math

N = int(input())
a = [int(input()) for _ in range(5)]

ans = math.ceil(N / min(a)) + 4

print(ans)

Solution (Python):
import math

N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
m = min(A, B, C, D, E)

ans = math.ceil(N / m) + 4

print(ans)

Solution (Python):
import sys
import math

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    N = INT()
    minv = inf
    for i in range(5):
        minv = min(minv, INT())
    print(5 + math.ceil(N/minv) - 1)

if __name__ == '__main__':
    main()

Solution (Python):
import math

N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())

if min(A,B,C,D,E)>=N:
    print(5)
else:
    print(math.ceil(N/min(A,B,C,D,E))+4)

Solution (Python):
import math
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

print(4 + math.ceil(N/min(A,B,C,D,E)))

Solution (Python):

import math
n = int(input())
minn = min([int(input()) for _ in range(5)])
print(math.ceil(n/minn)+4)

Solution (Python):
N = int(input())
a = []
for _ in range(5):
    a.append(int(input()))
print(N//min(a)+4 if 1 in a else N//min(a)+5)

Solution (Python):
import math
n = int(input())
a = [int(input()) for _ in range(5)]
print(4 + math.ceil(n / min(a)))

Solution (Python):
import math



N = int(input())

trans = [0] * 5
for i in range(5):
    trans[i] = int(input())

mini = min(trans)
ans = math.ceil((N / mini) + 4)
if N <= trans[0] and N <= trans[1] and N <= trans[2] and N <= trans[3] and N <= trans[4]:
    print(5)
else:
    print(ans)

Solution (Python):
from math import ceil
def main():
    n, *a = [int(input()) for i in range(6)]
    print(ceil(n/min(a))+4)

if __name__=="__main__": main()

Solution (Python):
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
l = [a,b,c,d,e]
l.sort()
import math
m = math.ceil(n / min(l))
print(m + 4)

Solution (Python):


import math
L = [int(input()) for _ in range(6)]

N = L[0]
L.remove(L[0])
L.sort()
min = L[0]
print(math.ceil(N/L[0]) + 4)

Solution (Python):
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())

mini=min(A,B,C,D,E)
if N%mini==0:
    print(N//mini+5-1)
else:
    print(N//mini+5)

Solution (Python):
N = int(input())
toll = [int(input()) for _ in range(5)]

from math import ceil
print(ceil(N/min(toll))+4)

Solution (Python):
from math import ceil

N = int(input())

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







print(ceil(N / min(capacity)) + 4)

Solution (Python):
import math
n = int(input())
t = [int(input()) for _ in range(5)]
time = math.ceil(n/min(t)) + 4
print(time)

Solution (Python):
import math, copy

N = int(input())

A = [0] * 5
A[0] = int(input())
A[1] = int(input())
A[2] = int(input())
A[3] = int(input())
A[4] = int(input())

print(math.ceil(N / min(A) + 4))

Solution (Python):
import math
N = int(input())
trans = [int(input()) for i in range(5)]

print(4+math.ceil(N/min(trans)))

Solution (Python):
def solve(string):
    n, *a_e = map(int, string.split())
    return str(5 + (n + min(a_e) - 1) // min(a_e) - 1)


if __name__ == '__main__':
    print(solve('\n'.join([input() for _ in range(6)])))

Solution (Python):
import math
n = int(input())
lst = list(map(int,[input() for i in range(5)]))

ans = 4+math.ceil(n/min(lst))
print(ans)

Solution (Python):
N = int(input())
mn = float('inf')
for i in range(5):
    a = int(input())
    mn = min(mn, a)
print((N+mn-1)//mn+4)

Solution (Python):
import numpy as np

n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

move_p = [a, b, c, d, e]






















min_ = min(move_p)
cnt = int(np.ceil(n / min_) + 4)

print(cnt)

Solution (Python):
N = int(input())
City = [int(input()) for _ in range(5)]

city = min(City)
amari = N % city
b = N // city + 1 if amari != 0 else N // city

print(b+len(City)-1)

Solution (Python):
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
ans=5

mins = min(a,b,c,d,e)
print(ans+(n-1)//mins)

Solution (Python):
import math

N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())

print(math.ceil(N/min(A,B,C,D,E))+4)

Solution (Python):
n = int(input())
a = []
time = 5
for i in range(5):
    a.append(int(input()))

if min(a) < n :
    if n%min(a)!=0:
        time = time + n//min(a)
    else:
        time = time + n//min(a)-1

print(time)

Solution (Python):
n = int(input())
l = [int(input()) for i in range(5)]
print((n-1) // min(l) + 5)