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

def step():

    for i in range(4,-1,-1):
        if state[i] <= capacities[i]:
            state[i+1] += state[i]
            state[i] = 0
        
        else:
            state[i+1] += capacities[i]
            state[i] -= capacities[i]


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











t = (N-1) // min(capacities) + 1 + 4

print(t)

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

Solution (Python):
import math

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

Solution (Python):
import math

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

m = min(A)  
t = math.ceil(N / m)  
print(5 + t - 1)

Solution (Python):
n=int(input())
p=[0]*5
for i in range(5):
    p[i]=int(input())
p.sort()
if n%p[0]!=0:
    ans=5+(n-n%p[0])/p[0]
else:
    ans=4+n/p[0]
print(int(ans))

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

Solution (Python):
import math

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

print(4+math.ceil(member/min(city)))

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

print((n - 1) // min(a) + 5)

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

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

Solution (Python):
move = []
min_time =0

N = int(input())
for i in range (5):
    move.append(int(input()))

if (N == min(move)):
    min_time = 5;
elif (N//min(move) == N/min(move)):
    min_time = N//min(move) + 4;
else:
    min_time = N//min(move) + 5;

print (min_time);

Solution (Python):


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

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

ans = 5+n//minimum

if n%minimum == 0:
  ans -=1

print(ans)

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

A = list()
for i in range(5):
    A.append(int(input()))

min_num = min(A)

ans = math.ceil(n/min_num)+4


print(ans)

Solution (Python):
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
 
minimum = min(a,b,c,d,e)
 
ans = 5+n//minimum

if n%minimum == 0:
    ans -=1
 
print(ans)

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

if N % mini != 0:
    ans = N // mini + 1 + 4
else:
    ans = N // mini + 4
    
print(ans)

Solution (Python):
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)
if n%x==0:
    y=n//x-1
else:
    y=n//x
print(5+y)

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

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

def timeToDestination(N, t):
  h = min(t)
  if N % h == 0:
    return 4 + (N // h)
  return 5 + (N // h)
  
print(timeToDestination(N, transport))

Solution (Python):
import math

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

Solution (Python):
def solve(n, traffic_list):
    min_val = min(traffic_list)
    if n % min_val == 0:
        return n // min_val + len(traffic_list) - 1
    else:
        return n // min_val + len(traffic_list)


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

    ans = solve(n, [a, b, c, d, e])
    print(ans)


main()

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

Solution (Python):
import math as m
L = [int(input()) for i in range(6)]
print(m.ceil(L[0] / min(L[1:])) + 4)

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

Solution (Python):
N = 6 
a = [] 
sum = 0 

for i in range(N):
    a.append(int(input()))
min_a = min(a[1:])
if a[0]%min_a == 0:
    print((5+a[0]//min_a)-1)
else:
    print(5+a[0]//min_a)

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

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

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

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

ans = 5+n//minimum
if n%minimum == 0:
    ans -=1

print(ans)

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

Solution (Python):
def transport(n,a,b,c,d,e):
    s = [a,b,c,d,e]
    x = min(s)
    return 5+int(1/x*(n-1))
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
print(transport(n,a,b,c,d,e))

Solution (Python):
import math

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

ans = int(math.floor(5 + (1 / min_capa) * (N - 1)))

print(ans)

Solution (Python):
import math
nums = [int(input()) for i in range(6)]

m = min(nums[1:])
batches = math.ceil(nums[0] / m)
more = batches - 1
print(5 + more)

Solution (Python):



NUM_TRANSPORTATIONS = 5
N = int(input())

min_t = float("inf")

for t in range(NUM_TRANSPORTATIONS):
    tt = int(input())
    if tt < min_t:
        min_t = tt
print '{}'.format( (N-1) / min_t + 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)
if N % MIN ==0:
    print(N // MIN + 4)
else:
    print( (N // MIN) + 5 )

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_val = min(a,b,c,d,e)
if n / min_val == 0:
    ans = 5
else:
    ans = ceil(4 + n / min_val) 
print(ans)

Solution (Python):
n =int(input())
a =int(input())
b =int(input())
c =int(input())
d =int(input())
e =int(input())
sample_list = []
sample_list.append(a)
sample_list.append(b)
sample_list.append(c)
sample_list.append(d)
sample_list.append(e)
z = 4
if n % min(sample_list) == 0:
  x = n // min(sample_list)
  print(z + x)
else:
  y = n // min(sample_list)
  print(z + y + 1)

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

Solution (Python):


people_num = int(input())

Transport_list = [0 for i in range(0,5)]
for i in range(5):
    Transport_list[i] = int(input())

bottle_nec = min(Transport_list)

if(people_num%bottle_nec == 0):
    print(people_num // bottle_nec + 4)
else:
    print(people_num // bottle_nec + 1 + 4)

Solution (Python):
import math

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

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


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

Solution (Python):
import math









N = int(input())

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

car.sort()

min_num = car[0]

time = math.ceil(N / min_num) + 4

print(time)

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

l = []
rem = []
for i in range(5):
    l.append(int(input()))

lmin = min(l)

ans = (n-1) // lmin + 1 + 4

print(ans)

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

Solution (Python):
n=int(input())
import numpy as np
line = np.zeros([5,],dtype=np.int)

minval = 10**15+1
minind = 0
for i in range(0,5):
    line[i] = int(input())
    if minval>line[i]:
        minind = i
        minval=line[i]

rem = n%minval
time = n//minval

count = 4
if rem==0:
    print(count+time)
else:
    print(count+time+1)

Solution (Python):
import sys
import math

N = int(input())

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

now = [N, 0, 0, 0, 0, 0]

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













print(int(ans))

Solution (Python):
n = int(input())
List = []
List.append(int(input()))
List.append(int(input()))
List.append(int(input()))
List.append(int(input()))
List.append(int(input()))

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

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

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

time=-(-n//mintime)+4
print(time)

Solution (Python):
import math

n, a, b, c, d, e = [int(input()) for _ in range(6)]
print(math.ceil(n / min([a,b,c,d,e])) + 4)

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

Solution (Python):
n,*l=[int(input())for _ in range(6)]
m=min(l)
if m==1:print(n+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())

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

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

Solution (Python):
import math

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

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

Solution (Python):


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

Lmin = min(L)
ans = (N+Lmin-1)//Lmin + 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())

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


x = math.ceil(n / min(a, b, c, d, e))
print(x + 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)
 
print(int((n-1)/min)+5)

Solution (Python):
from math import ceil
 
info = [int(input()) for i in range(6)]
listdesu = []
for i in range(1,6):
  listdesu.append(ceil(info[0]/info[i]))
print(max(listdesu)+4)

Solution (Python):
n = int(input())
A = []
for _ in range(5):
  A.append(int(input()))
x = min(A)
print((n + x - 1) // x + 4)

Solution (Python):
import math
n = input()
trans = []
for i in range(5):
    r = int(input())
    trans.append(r)

timer = math.ceil(int(n)/min(trans))+4

print(timer)

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

print((n - 1) // min(a) + 5)

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

min_trans = [min(trans_list),trans_list.index(min(trans_list))]

if min_trans[0]>=N :
    print(5)
else:
    syou, amari = divmod(N,min_trans[0])
    if amari !=0 :
        print(syou+1+4)
    else:
        print(syou+4)

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

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

minimum = 1e15 + 1

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

print(n // minimum + (n % minimum > 0) + 4)

Solution (Python):
n,*a=map(int,open(0));m=min(a);print((n+m-1)//m+4)

Solution (Python):
import math

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

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

Solution (Python):
import math
 
n = input("")
a = input("")
b = input("")
c = input("")
d = input("")
e = input("")
 
list_i = [float(a),float(b),float(c),float(d),float(e)]
 
num = min(list_i)
count = n / num
 
print(int(math.ceil(count+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)
if N % m == 0:
    print(N // m + 4)
else:
    print(N // m + 5)

Solution (Python):
n = int(input())
capacity = [int(input()) for i in range(5)]
classes, mod = divmod(n, min(capacity))
if mod != 0:
    classes += 1
print(5 + classes - 1)

Solution (Python):
def main():
    n = int(input())
    t = [int(input()) for _ in range(5)]
    print(solve(n, t))

def solve(n, t):
    m = min(t)
    t = ceil_div(n, m) + len(t) - 1
    return t

def ceil_div(x, y):
    return (x + y - 1) // y

main()

Solution (Python):
import numpy as np
n = int(input())
a = []
for i in range(5):
    inp = int(input())
    a.append(inp)
mini = min(a)
time = int(np.ceil(n/mini))
print(time+4)

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
l = [int(input()) for _ in range(6)]
p = math.ceil(l[0]/min(l[1:]))
print(4+p)

Solution (Python):

import math

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

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

print(int(ans))

Solution (Python):
import math
import sys

n, *ns = [int(i) for i in sys.stdin.read().strip().split('\n')]
m = min(ns)

ans = math.ceil(n / m) + 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())
 
g = [a, b, c, d, e]
h = min(g)
p = math.ceil(n / h)
 
print(4 + p)

Solution (Python):
def func(a,b):
	return -(-a//b)

N=int(input())
A=[int(input()) for _ in range(5)]
print(4+func(N,min(A)))

Solution (Python):
import numpy as np

n=int(input())
ae=[]
for _ in range(5):
    ae.append(int(input()))
ae=np.array(ae)
min_ae=min(ae)
num_ae=-(-n//ae)-1

print(5+max(num_ae))

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

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

min_num = min(capa_list)
min_index = capa_list.index(min(capa_list))


hoge = 0 if n%min_num == 0 else 1

t = (min_index) + (n//min_num + hoge) + (len(capa_list[min_index+1:]))

print(t)

Solution (Python):
[N,A,B,C,D,E] = [int(input()) for i in range(6)]
import math
p = math.ceil(N/min([A,B,C,D,E]))
print(4 +p)

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

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

Solution (Python):
N = int(input())
abc = [int(input()) for _ in range(5)]
ans = N//min(abc)
if N%min(abc):
    ans += 1
print(ans+4)

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

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

Solution (Python):
from sys import stdin
import math

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

mn = min(a)

if mn >= N:
    t = 5
else:
    t = 4 + math.ceil(N / mn)
    
print(t)

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

Solution (Python):
import sys
import math

ns = [int(i) for i in sys.stdin.read().strip().split('\n')]
n = ns[0]
ns = ns[1:]
m = min(ns)

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

Solution (Python):
inputs = [int(raw_input()) for i in range(6)]
bn = min(inputs[1:])
print inputs[0] / bn + 4 + (1 if inputs[0] % bn else 0)

Solution (Python):
import math


if __name__ == '__main__':
    passed_time = 0
    is_traveling = True

    tourist_count = int(input())
    transports = []
    for i in range(5):
        transports.append(int(input()))

    bottle_neck = min(transports)
    print(math.ceil(tourist_count / bottle_neck) + 4)

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

transport_capacity = []
for i in range(5):
    transport_capacity.append(int(input()))

min_transport_capacity = min(transport_capacity)
time = 4 + (people_num + min_transport_capacity - 1) // min_transport_capacity
print(time)

Solution (Python):

n = int(input())
a = []
for i in range (5):
  a += [int(input())]
min = a[0]
for i in range (1,5):
  if min > a[i]:
    min = a[i]
b =n % min
c = n // min
if b == 0:
  t = c + 4
else:
  t = c + 5
print(t)

Solution (Python):
N = int(input())
abc = [int(input()) for _ in range(5)]
ans = N//min(abc)
if N%min(abc):
    ans += 1
print(ans+4)

Solution (Python):
import math

input_num = [int(input()) for _ in range(6)]
N, place = input_num[0], input_num[1:]

print(math.ceil((N)/min(place)) + len(place)-1)

Solution (Python):
import math
min = 10**15
n = float(input())
for i in range(5):
    x = int(input())
    if x < min:
        min = x
print (math.ceil(n/min)+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 i in range(5)]
idx = A.index(min(A))
print(math.ceil(N/A[idx])+4)

Solution (Python):

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

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

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

Solution (Python):
n = int(input())
mi = 10**16
for _ in range(5):
    s = int(input())
    mi = min(mi, s)

ret = n//mi
if n%mi != 0:
    ret += 1

print(ret + 4)

Solution (Python):
people = int(input())
capacities = [int(input()) for _ in range(5)]

print(-(-people // min(capacities)) + 4)

Solution (Python):
import numpy as np


N, A, B, C, D, E = [int(input()) for _ in range(6)]


waits = [N, 0, 0, 0, 0, 0]
narrowest = min(A,B,C,D,E)
narrowest_id = [A,B,C,D,E].index(narrowest)

t = 4
t += np.ceil(N / narrowest)
print(int(t))

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

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

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

print(int(np.ceil(n / min(a)) +4))

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

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

Solution (Python):
import math

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

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

num.sort()

result = int((N-1)/num[0])+5

print(result)

Solution (Python):
import math
n = int(input())
a = [int(input()) for i in range(5)]
MAX = 0
for i,j in enumerate(a):
  most = math.ceil(n / j) + i
  MAX = max(MAX+1,most)
print(MAX)

Solution (Python):
N = int(input())
A = [int(input()) for i in range(5)]
A.sort()
D = A[0]
print(((N - A[0]+D-1) // D) + 5)

Solution (Python):
import math
N, L = int(input()), [int(input()) for i in range(5)]
ans = 5 if N < min(L) else math.ceil(N / min(L)) + 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())

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

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

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

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

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

Solution (Python):
import math
n = int(input())
x = []
for i in range(5):
    u = int(input())
    x.append(u)

mins = min(x)

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

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

num = N

if num >= A:
    num = A 

if num >= B:
    num = B

if num >= C:
    num = C

if num >= D:
    num = D

if num >= E:
    num = E

if N % num == 0:
    print(N // num + 4)
else:
    print(N // num + 5)

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

minVal = pow(10, 15)
minIdx = -1

for i in range(5):
    carry.append(int(input()))
    if carry[i] < minVal:
        minIdx = i
        minVal = carry[i]

k = 0 if N%minVal == 0 else 1
print(N//minVal + 4 + k)

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

if n % min_transportations != 0:
    print(5 + n // min_transportations)
else:
    print(4 + n // min_transportations)

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

Solution (Python):
import math

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

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

print(res)

Solution (Python):
import math

n = int(input())

arr=[int(input()),int(input()),int(input()),int(input()),int(input())]

min=arr[0]

for capa in arr:
    if capa < min:
        min = capa

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

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

Solution (Python):
from sys import exit
import math

N = int(input())

capa = [int(input()), int(input()), int(input()), int(input()), int(input())]

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

print(time)

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

ans = n//min(a) if n%min(a) == 0 else n//min(a)+1
print(ans+4)

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

m = min(A)
g = (N + m - 1) // m

print(g - 1 + 5)

Solution (Python):
from collections import Counter
from functools import reduce
import fractions
import math
import statistics
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]  
def LF(): return [float(x) for x in sys.stdin.readline().split()]  
def LS(): return sys.stdin.readline().split()  
def MI(): return map(int, sys.stdin.readline().split())  
def II(): return int(sys.stdin.readline())  
def IS(): return input()  
def P(x): return print(x)
def C(x): return Counter(x)
def GCD_LIST(numbers):  
    return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers):  
    return reduce(LCM, numbers)
def LCM(m, n):
    return (m * n // fractions.gcd(m, n))


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

Solution (Python):
N=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=[a,b,c,d,e]

f=min(k)

if N%f==0:
  time=N//f+4
else:
  time=N//f+5
  
print(time)

Solution (Python):
list1 = []
list2 = []

time = 0
for n in range(6):

    list1.append(int(input()))

list2 = list1[1:]

time = (list1[0] // min(list2))

if (list1[0] % min(list2)) != 0:
    time += 1

time += 4

print int(time)

Solution (Python):
N = int(input())
a = [0]*5
for i in range(5):
    a[i] = int(input())
delay = int(N/min(a))
if N%min(a)==0:
    delay -= 1

print(5+delay)

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

Solution (Python):
n,*a=map(int,open(0));print(4--n//min(a))

Solution (Python):


list = [0] * 6
n_move = []
time = 4

N = int(input())

for i in range(5) : 
    n_move.append(int(input()))
    
n_min = min(n_move)

if(N % n_min == 0) : 
    time += N // n_min
else : 
    time += N // n_min + 1

print(time)

Solution (Python):

import math
N=input()
m=min(input(),input(),input(),input(),input(),)
def ceildiv(a, b):
    return -(-a // b)
print(ceildiv(N,m) + 4)

Solution (Python):
import math
N = int(input())
Cap = [0]*5
time = 4
 
for i in range(5):
    Cap[i] = int(input())
 
    
time += math.ceil(N/min(Cap))
print(time)

Solution (Python):
import sys
import math

def main(inp):
    N=int(next(inp).split()[0])
    cap = [int(next(inp).split()[0]) for _ in range(5)]
    
    time=math.ceil(N/cap[0])
    
    for i in range(1,5):
        if(cap[i-1]<=cap[i]):
            cap[i]=cap[i-1]
            time+=1


        else: time+=math.ceil(N/cap[i])-math.ceil(N/cap[i-1])+1
            
    return time
  
print(main(sys.stdin))

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

Solution (Python):
n = int(input())
move = [int(input()) for i in range(5)]
div,mod = divmod(n,min(move))
if mod == 0:
    print(div + 4)
else:print(div + 5)

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

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

n = v[0]
v = np.array(v[1:])
min = np.min(v)

res = (n-1) // min + 5
print(res)

Solution (Python):
import sys,heapq
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True 
def ddprint(x):
  if DBG:
    print(x)

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

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

Solution (Python):
import math

a = [int(input()) for i in range(6)]
b = min([a[n] for n in range(1,6)])
print(math.ceil(a[0]/b)+4)

Solution (Python):
import sys
import math

n = int(sys.stdin.readline())

mn = 10 ** 16
for i in range(5):
    mn = min(mn, int(sys.stdin.readline()))

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

Solution (Python):
import sys
import math

n = int(sys.stdin.readline())

mn = pow(10, 16)
for i in range(5):
    mn = min(mn, int(sys.stdin.readline()))

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

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

Solution (Python):
import math

N, A, B, C, D, E = [int(input()) for _ in range(6)]
moves = [A, B, C, D, E]

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

Solution (Python):
from math import ceil as c

a=[]
for i in range(6):
  a.append(int(input()))
n=a[0]
b=0
for i in a[1:]:
  if b<c(n/i):
    b=c(n/i)
print(b+4)

Solution (Python):
import time
import math
list=[]
n=int(input())
for a in range(5):
    list.append(int(input()))
min=min(list)
print(math.ceil(n/min)-1+len(list))

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

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

Solution (Python):
li=[0]*5
n=int(input())
for i in range(5):
  li[i]=int(input())
li.sort()
print(5+(n-1)//li[0])

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

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

Solution (Python):
x = [int(input()) for i in range(6)]

min = x[1]
for i in range(5):
    if min > x[i+1]:
        min = x[i+1]

if x[0]%min == 0:
    print(x[0]//min+4)
else:
    print(x[0]//min+5)

Solution (Python):
n = int(input())
res = 0
min_t = n
for i in range(5):
    trans = int(input())
    if trans < min_t:
        min_t = trans
print(4 - (- n) // min_t)

Solution (Python):


import sys


INF = float('inf')
MOD = 10 ** 9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()


def ceil(n, m):
    return -(-n//m)


def main():
    n = II()
    T = [II() for _ in range(5)]

    return 4 + ceil(n, min(T))


print(main())

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

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

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

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