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())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
print((N-1)//min(A, B, C, D, E)+5)

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

print(((N+min(T)-1)//min(T))+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]
ans = 5
min_take = min(l)

if min(l) >= n:
    ans = 5
else:
    if n % min_take != 0:
        group = n // min_take
    else:
        group = n // min_take - 1
    ans += group

print(ans)

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)
if N % m == 0:
    print(N // m + 4)
else:
    print(N // m + 5)

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)

if m >= n:
    cnt = 1
elif n % m != 0:
    cnt = n // m + 1
else:
    cnt = n // m

print(cnt + 4)

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


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

city = [0] * 6


print(int((N + min(lift) - 1)  / min(lift) + 4))

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

max_div = 0
for i in abcde_list:
  div = (N+i-1)//i
  if max_div < div:
    max_div = div 
  
print(max_div+4)

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

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

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

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

mn = min([A,B,C,D,E])
if N % mn == 0:
    print(N // mn + 4)
else:
    print(N // mn + 5)

Solution (Python):
n=int(input())
c=list(map(int,[input() for _ in range(5) ]))

if n>min(c):
    if n%min(c)==0:
        print(n//min(c)+4)
    else:
        print(n//min(c)+5)


else:
    print(5)

Solution (Python):

import math

t = [int]*5

n = int(input())
for i in range(5):
	t[i] = int(input())

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

Solution (Python):
lst = [int(input()) for _ in range(6)]
print(4 + (-(-lst[0] // min(lst[1:]))))

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

mi = min(li)
print ( 4 + N//mi + (0 if (N%mi==0) else 1) )

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

min_traffic = min(A, B, C, D, E)
print((-(-S // min_traffic))+4)

Solution (Python):
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(int(n/f) + 4)
else:
    print(int(n/f) + 5)

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

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

Solution (Python):

from math import ceil

def f1(n,a,b,c,d,e):
    m = min(a,b,c,d,e)
    if m==1:
        s = n
    elif n>m:
        s = ceil(n/m)
    else:
        s = 1
    return 5+s-1

def f2(n,a,b,c,d,e):
    op = [a,b,c,d,e]
    l = [0]*6
    l[0] = n
    res = 0
    flag = True
    while flag:
        flag = False
        for i in [4,3,2,1,0]:
            if l[i]>0:
                m = min(op[i],l[i])
                l[i] -= m
                l[i+1] += m
                flag = True
        res += 1
        if l[5]==n:
            flag = False
    return res

if __name__ == '__main__':
    n = int(input())
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())
    print(f1(n,a,b,c,d,e))

Solution (Python):
n = int(input())
x = 10**20
for i in range(5):
    x = min(x, int(input()))
print((n+x-1)//x+4)

Solution (Python):
n = int(input())
buf = []
for i in range(5):
  buf.append(int(input()))
  
print(n // min(buf) + 5 - (n % min(buf) == 0))

Solution (Python):
import math
n = int(input())
state = [n, 0, 0, 0, 0, 0]
capacities = [int(input()) for _ in range(5)]
for i in range(1, 5):
    if capacities[i - 1] < capacities[i]:
        capacities[i] = capacities[i - 1]
print(4+math.ceil(n/capacities[4]))

Solution (Python):
TRANSPORTATION_COUNT = 5

people_count = int(input())
capacity_counts = [int(input()) for i in range(TRANSPORTATION_COUNT)]
result = people_count // min(capacity_counts)

if people_count % min(capacity_counts) > 0:
    result += TRANSPORTATION_COUNT
else:
    result += TRANSPORTATION_COUNT - 1
    
print(result)

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

Solution (Python):

import math

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

traffics = [a, b, c, d, e]
min_traffic = min(traffics)
ans = math.ceil(N / min_traffic) + 4
print(ans)

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


if n%s is 0:
  n = n//s
else:
  n = n//s + 1
  
print(n+4)

Solution (Python):



def main():
    n = int(input())
    sizes = [int(input()) for _ in range(5)]
    min_size = min(sizes)
    if min_size < n:
        if n % min_size == 0:
            times = int(n / min_size)
        else:
            times = int(n / min_size) + 1
        print(5 + times - 1)
    else:
        print(5)


if __name__ == '__main__':
    main()

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

time = 4
print(time + math.ceil(N/min(ABCDE)))

Solution (Python):
from math import ceil


def main(N, A, B, C, D, E):
    loads = [A, B, C, D, E]
    min_val = min(loads)
    min_index = loads.index(min_val)

    res = min_index + ceil(N / min_val) + (5 - (min_index + 1))

    return res


if __name__ == "__main__":
    N = int(input())
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())
    E = int(input())
    print(main(N, A, B, C, D, E))

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)
X = N // M
if N % M == 0:
    X = X - 1
print(5 + X)

Solution (Python):
N = int(input())
cost = [0,0,0,0,0]
for i in range(5):
    cost[i] = int(input())
mini = min(cost)

if mini >= N:
    print(5)
elif N % mini == 0:
    print(4+N//mini)
else:
    print(6+(N-mini)//mini)

Solution (Python):

n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
ans = 0
minimum = min(a, b, c, d, e)

if a == minimum:
    ans = -(-n//a) + 4
elif b == minimum:
    ans = -(-n//b) + 4
elif c == minimum:
    ans = -(-n//c) + 4
elif d == minimum:
    ans = -(-n//d) + 4
elif e == minimum:
    ans = -(-n//e) + 4
print(ans)

Solution (Python):
import math

n, a, b, c, d, e = map(int, [input() for i in range(6)])

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

Solution (Python):
n, a, b, c, d, e = list(int(input()) for _ in range(6))

m = min(a, b, c, d, e)
t = (n - 1) // m + 5
print(t)

Solution (Python):
N = int(input())
List = list(map(int, [input() for _ in range(5)]))

ans = 0
List.sort()
m = List[0]
if N % m == 0:
    ans = 4 + (N // m)
else:
    ans = 5 + N // m
print(ans)

Solution (Python):
import sys

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

h.sort()
wh = h[0]
ww = n % wh
if ww == 0:
    wn = int(n / wh) - 1 + 5
else:
    wn = int(round((n / wh) + 0.5)) - 1 + 5

print(wn)

Solution (Python):
import math

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)
res = 4 + math.ceil(N / neck)
print(res)

Solution (Python):


from bisect import bisect_left as binl

def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * sy) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x





def main():
    n = intin()
    capalist = intinl(5)

    time = n // min(capalist) + (1 if n % min(capalist) else 0)
    print(time + 4)


if __name__ == '__main__':
    main()

Solution (Python):
import numpy as np
N = int(input())
ary = []
for i in range(5):
  ary.append(int(input()))

min_num = np.array(ary).min()

ans = np.ceil(N/min_num) + 4
print(int(ans))

Solution (Python):
N = int(input())
T = [int(input()) for _ in range(5)]
MI = min(T)
if N % MI != 0:
    print(4 + N//MI + 1)
else:
    print(4 + N//MI)

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

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

if n_min >= n:
    print(5)

else:
    if n%n_min ==0:
        print(5 -1 + n//n_min)
    else:
        print(5 + n//n_min)

Solution (Python):
print(5+(int(input())-1)//min([int(input()) for _ in range(5)]))

Solution (Python):
N = int(input())
Q = [int(input()) for i in range(5)]
 
min_value = min(Q)
min_index = Q.index(min_value)
if N%min_value == 0:
  print(N//min_value + 5 - 1)
else:
  print(N//min_value + 5)

Solution (Python):
import math

n = int(input())

capa = []
for i in range(5):
    capa.append(int(input()))
    
bneck = min(capa)
time = math.ceil(n / bneck) - 1 + 5


print(time)

Solution (Python):
n = int(input())
alp = []
for i in range(5):
    alp.append(int(input()))
b_neck = min(alp)
if b_neck >= n:
    print(5)
else:
    if n % b_neck == 0:
        print(int(n//b_neck)+4)
    else:
        print(int(n//b_neck)+5)

Solution (Python):
a = int(input())
b = [int(input()) for i in range(5)]
c = min(b)
if a > c:
    if a%c == 0:
        d = int(a/c) + 4
        print(d)
    else:
        d = int(a/c) + 5
        print(d)
else :
    print(5)

Solution (Python):
from math import ceil
N = int(input())
caps = [int(input()) for i in range(5)]
mincap = min(caps)
print(4+ceil(N/mincap))

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

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

Solution (Python):
N = int(input())
A = []
MAX = 10**15+1
a_min = MAX

for i in range(5):
    a = int(input())
    A.append(a)
    if a_min > a:
        a_min = a

print(N//a_min-1+(1 if N%a_min>0 else 0)+5)

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

m = min(a)
idx = a.index(m)
t = (n + (m-1)) // m + 4
print(t)

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())
norimono_list = [int(input()) for i in range(5)]


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

Solution (Python):
a=[]
for i in range(0,6):
  a.append(int(input()))
j=1
for i in range(1,6):
  if a[i]<a[j]:
    j=i
import math
print(math.ceil(a[0]/a[j])+4)

Solution (Python):

N = int(input())
cap = []
for n in range(5):
    cap.append(int(input()))

min_cap = min(cap)

print(int((N + min_cap - 1) / min_cap) + 4)

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

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

from math import ceil
m = ceil(N / min(T))

result = m + 4

print(result)

Solution (Python):
from sys import stdin
import numpy as np
import math

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

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



"""

place = np.zeros(6)
place[0] = N
cnt = 0
while(True):
  cnt += 1
  place[5] += min(A[4], place[4])
  place[4] += min(A[3], place[3]) - min(A[4], place[4])
  place[3] += min(A[2], place[2]) - min(A[3], place[3])
  place[2] += min(A[1], place[1]) - min(A[2], place[2])
  place[1] += min(A[0], place[0]) - min(A[1], place[1])
  place[0] -= min(A[0], place[0])
  if int(place[5]) == N:
    break
    
ans = cnt  
print(ans)
"""

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




ans = 0

people = [N,0,0,0,0,0]
latest = 0


'''
while True:
	if (people[-1] == N):
		break
	else:
		for i in reversed(range(len(cities))):
			tmp = people[i]
			people[i] = max(0, people[i] - cities[i])
			people[i+1] += tmp - people[i]


	ans += 1
'''

critical = (N - 1) // min(cities) 


print (5 + critical)

Solution (Python):
from math import ceil
n = int(input())

transport_times = []
for _ in range(5):
    transport_times.append(int(input()))

ans = ceil(n / min(transport_times)) + 4
print(ans)

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

Solution (Python):
N,A,B,C,D,E = [int(input()) for i in range(6)]
m = min(A,B,C,D,E)
print(((N-1) // m) + 5)

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

Solution (Python):


import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

import math
def main():
    N = i2n()
    ABCDE = ii2nn(5)
    m = min(ABCDE)
    n = int(math.ceil(N / m)) + 4
    print(n)

main()

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

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

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

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


if N % min_cost == 0:
    g_num = N // min_cost
else:
    g_num = N // min_cost + 1

print(5 + g_num - 1)

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

v = (N-1) // min(X)
print(v + 5)

Solution (Python):
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
print(5 + int(max((n-0.1)//a,(n-0.1)//b,(n-0.1)//c,(n-0.1)//d,(n-0.1)//e)))

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

Solution (Python):

import math

n = int(input())
l = [int(input()) for i in range(5)]
l.sort()

a = math.ceil(n/l[0])+4
print(a)

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

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

Solution (Python):
n=int(input())
time=[]
for i in range(5):
  time.append(int(input()))
time.append(0)
mini=time[0]
for i in range(5):
  mini=min(mini,time[i])
delay=(n-1)//mini+5
print(delay)

Solution (Python):


n = int(input())
num = []
town = [0, 0, 0, 0, 0, 0]
time = 0
for i in range(5):
    num.append([int(input()),i])
town[0] = n



time = (n-1) // min(num)[0] + 5  
print(time)

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)
print(math.ceil(N/m) + 4)

Solution (Python):
from math import ceil
N = int(input())
arr = [int(input()) for _ in range(5)]

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

Solution (Python):
import numpy as np
N = int(input())
l = []
for _ in range(5):
    l.append(int(input()))
l = np.array(l)
l_min = np.min(l)
if N < l_min:
    print(5)
else:
    if l_min == 1:
        result = 5 + (N//l_min) - 1
    else:
        result = 5 + (N//l_min)
    print(result)

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

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

trans.sort()

if N % trans[0] == 0:
    print(N // trans[0] + 4)
else:
    print(N // trans[0] + 5)

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):
N = int(input())
city = []
for i in range(5):
    city.append(int(input()))
kazu = N//min(city) + 1
if N%min(city) == 0:
    print(kazu + 3)
else:
    print(kazu + 4)

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

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

ans = -(-n//small_road)+4

print(ans)

Solution (Python):
import math
n = int(input())
time = [int(input()) for i in range(5)]
print(math.ceil(n / min(time) + 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):
n=int(input())
A=[int(input())for i in range(5)]
ans=(n+min(A)-1)//min(A)+4
print(ans)

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

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

Solution (Python):
def roof(x):
    if x == int(x):
        return int(x)
    else:
        return int(x)+1

n = int(input())
l = [0] * 5
for i in range(0,5):
    l[i] = int(input())

m = min(l)

t = roof(n/m)

print(t + 4)

Solution (Python):

import math

def main():
    N = int(input())
    facilities = []
    for i in range(5):
        facilities.append(int(input()))
    print(math.ceil(N/min(facilities))+4)


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())

total = 0

ride_list = []

ride_list.append(a)
ride_list.append(b)
ride_list.append(c)
ride_list.append(d)
ride_list.append(e)

ride_list.sort()

round_total = math.ceil(n / ride_list[0])
total = round_total + 4

print(total)

Solution (Python):
from math import ceil
N = int(input())
X = [int(input()) for i in range(5)]
print( ceil(1.0*N/min(X))+4 )

Solution (Python):
import math

N,A,B,C,D,E = map(int,[input() for x in range(6)])
p = min(A,B,C,D,E)
print(math.ceil(N/p)+4)

Solution (Python):
import math

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

neck_list = []
for num in num_list:
    neck_list.append(math.ceil(n/num))

print(4 + max(neck_list))

Solution (Python):
import math

n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
t = min(a, b, c, d, e)
ans = 5 + math.ceil((n - t) / t)
print(ans)

Solution (Python):
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=min(a,b,c,d,e)
if n%k==0:
  print(n//k+4)
else:
  print(n//k+5)

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

if min(R)>=N:
  print(5)
else:
  if N % min(R)==0:
    print(N//min(R)+4)
  else:
    print(N//min(R)+5)

Solution (Python):
n = int(input())

max_nums = []
for i in range(5):
  max_nums.append(int(input()))
max_nums.append(n)
a = n/min(max_nums)
print(int(a) +4+ (0 if a == int(a) else 1))

Solution (Python):
N = int(input())
cyapa = []
for i in range (1,6):
    cyapa.append(int(input()))
kasu = min(cyapa)
if kasu >= N:
    ans = 5
else:
    ans = 5 + (N-1)//kasu
print(ans)

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)

print ((n + m -1)//m + 4)

Solution (Python):
import sys

num = [int(line.strip()) for line in sys.stdin]
N = num.pop(0)
n = min(num)
print((N+n-1)//n + 4)

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

Solution (Python):
from itertools import permutations

N = int(input())
trans = [int(input()) for _ in range(5)]
bottleneck = min(trans)

print((N-1) // bottleneck + 1 + 4)

Solution (Python):
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
stay_a=N
stay_b=0
stay_c=0
stay_d=0
stay_e=0
stay_f=0
f = -(-N//min(A,B,C,D,E))
print(4+f)

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)
 
ans = 4 + int(N/min)
if N % min != 0:
    ans = ans + 1
print(ans)

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






























print((N-1) // min(A,B,C,D,E) + 5)

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(5)]
small = min(A)
a = A.index(min(A)) 
bottle = float(N/small if small!=1 else N)
if bottle >int(bottle):
    bottle = int(bottle)+1
print(int(4+max(bottle,1)))

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(5)]
small = min(A)
a = A.index(min(A)) 
bottle = (N+small-1)/small if small!=1 else N
print(int(4+max(bottle,1)))

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

print (time)

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

Solution (Python):
n = int(input())
abcde = []
for i in range(5):
    abcde.append(int(input()))
print(-(-n//min(abcde)) + 4)

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

Solution (Python):
import math
def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

n, = read_line(int)

weights = []
for i in range(5):
    w, = read_line(int)
    weights.append(w)

if n == 0:
    print(0)
elif n <= min(weights):
    print(5)
else:
    print(5 + int(math.ceil(n / min(weights))) - 1)

Solution (Python):
from math import ceil
from sys import stdin
N = int(stdin.readline().rstrip())
cities = [int(stdin.readline().rstrip()) for _ in range(5)]
print(ceil(N/min(cities))+4)

Solution (Python):



import math


def problem(n, a, b, c, d, e):
    return int(math.ceil(n / min(a, b, c, d, e))) + 4


def main():
    n = int(input())
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())

    print(problem(n, a, b, c, d, e))


if __name__ == '__main__':
    main()

Solution (Python):
a = []
for i in range(6):
  a.append(int(input()))
print((a[0]-1)//min(a[1:])+5)

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)

ans = 4 + int(N/min)
if N % min != 0:
    ans = ans + 1
print(ans)

Solution (Python):
src = [int(input()) for _ in range(6)]
t = min(src[1:])
if src[0]%t:
  print(4 + src[0]//t + 1)
else:
  print(4 + src[0]//t)

Solution (Python):
N = int(input())
A = float('inf')
for i in range(5):
    A = min(A, int(input()))

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

Solution (Python):
import math

s=[int(input()) for x in range(6)]

n=s.pop(0)
t=int(4+math.ceil(1.0*n/min(s)))

print(t)

Solution (Python):


import math

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

if N <= min(ls):
    print(5)
else:
    mint = min(ls)
    ans = 4 + math.ceil(N/mint) 
    print(ans)

Solution (Python):
import math

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

x = 1
for a in A:
    x = max(x, math.ceil(N / a))
print(4 + x)

Solution (Python):
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
a0=min(a,b,c,d,e)
ans = 4 + n//a0
if n%a0 != 0:
    ans += 1
print(ans)

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

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

a = []

for i in range(5):
  w = int(input())
  a.append(w)

if N <= min(a):
  print(5)
else:
  print(ceil(N/min(a))+4)

Solution (Python):
n = int(input())
times = [int(input()) for i in range(5)]
bottleneck = min(times)
at_bn = n // bottleneck + (n%bottleneck>0)
total_time = 4 + at_bn
print(total_time)

Solution (Python):
n,*a=map(int,open(0).read().split())
b=min(a)
if b>=n:
    print(5)
else:
    print(n//b+(n%b>0)+4)

Solution (Python):


import math

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

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

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

s = min(A)
c = N // s

if N - c * s > 0:
  c += 1
  
c+=4

print(c)

Solution (Python):



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

minimum = min(v)
if n % minimum is 0:
    print((n // minimum)+4)
else:
    print((n // minimum)+5)

Solution (Python):


n = int(input())

data = []
for i in range(5):
    data.append(int(input()))
flow = min(data)

if n % flow == 0:
    ans = n // flow + 4
else:
    ans = n // flow + 5

print(ans)

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

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

if N%min(data) == 0:
    time = N//min(data) + 4
else:
    time = N//min(data) + 5

print(time)

Solution (Python):
a = input()
s = input()
d = input()
f = input()
g = input()
h = input()
j = min(int(s), int(d), int(f), int(g), int(h))

if int(a)%j == 0:
    k = int(a)//j + 4
else:
    k = int(a)//j + 5
print(k)

Solution (Python):
import math

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

min_n = min(nums)

print(math.ceil(N/min_n) + 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 = N // m if N % m != 0 else (N // m) - 1

print(ans + 5)

Solution (Python):
import math

N=int(input())
mincapacity=10**16
for i in range(5):
  capacity=int(input())
  if capacity<mincapacity:
    mincapacity=capacity
    minindex=i
print(5+math.ceil(N/mincapacity)-1)

Solution (Python):
n = int(input())

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

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

def wari(a,n):
    if n%a == 0:
        return n//a
    else:
        return n//a + 1


modtrans = [wari(i,n) for i in trans]

print(max(modtrans) + 4)

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

Solution (Python):
numberOfToorists = int(input())

minimumCapacity = 10.0**16

for i in range(5):
	vehicleCapacity = int(input())
	minimumCapacity = min(minimumCapacity, vehicleCapacity)

bottleNeckTime = int(numberOfToorists / minimumCapacity)

if numberOfToorists % minimumCapacity > 0:
	bottleNeckTime += 1

requiredTime = bottleNeckTime + 4

print(requiredTime)

Solution (Python):
import math
if __name__ =="__main__":
    N = input()
    N = float(N)
    cap_min=10.0**16
    for x in range(5):
        a = input()
        cap_min = min(float(a),cap_min)
    time = math.ceil(N/cap_min)+4
    print(time)

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


y = min(x)


if N%y==0:
    print(int(N/y)+4)
else:
    print(N//y+1+4)

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


y = min(x)
print(math.ceil(N/y)+4)

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

m = a[0]
for i in range(5):
        if a[i] < m:
                m = a[i]
        else:
                a[i] = m


s = 4 + int(math.ceil(N / a[4]))

print(s)

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

minv = min(a)
print((n + minv - 1) // minv + 4)

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

li.sort()
m = li[0]
ans = 0
if n % m == 0:
    ans += n//m
else:
    ans += n//m + 1
ans += 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())

bottle_neck=min(A,B,C,D,E)

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

print(ans)

Solution (Python):
import math

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


X = min(abcde)
print(math.ceil(N / X) - 1 + 5)

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

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

Solution (Python):
n = int(input())
arr = []
for i in range(5):
    arr.append(int(input()))
min_num = min(arr)
c = (n + min_num - 1) // min_num +4 
print(c)

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    n = float(input())
    tr = [float(input().replace('\n', '')) for i in range(5)] 
    
    q, mod = divmod(n, min(tr))
    
    if(mod == 0):
        q = q - 1
    
    print(int(5 + q))
    
if __name__ == '__main__':
    main()

Solution (Python):

import copy
import math


n = int(input())

capa = []

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


capa_min = min(capa)

ans = n//capa_min 




amari = n % capa_min


if amari != 0:
    ans += 5
else:
    ans += 4
    
print (str(ans))

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

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