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())
mi = 1e20
for i in range(5):
    mi = min(mi,int(input()))
print(n//mi + (n%mi!=0) + 4)

Solution (Python):
n = int(input())
mi = 1e20
for i in range(5):
    mi = min(mi,int(input()))
print(n//mi + (n%mi!=0) + 4)

Solution (Python):
import math

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

Solution (Python):
import math
N = int(input())
A = [int(input()) for _ in range(5)]
ans = 0
if min(A) >= N:
    ans = 5
    print(ans)
else:
    x = math.ceil(N/min(A))
    ans = x + 4
    print(ans)

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

Solution (Python):
N = long(raw_input())
A = long(raw_input())
B = long(raw_input())
C = long(raw_input())
D = long(raw_input())
E = long(raw_input())

list = [A, B, C, D, E]







lminindex = list.index(min(list))

min = list[lminindex]


T1 = -(-N // min) + 4
print(T1)

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

count = math.ceil(n/min(a,b,c,d,e))
print(count+len('ABCDE')-1)

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

Solution (Python):
n = int(input())
ds = [int(input()) for _ in range(5)]
def f(x):
  	return (n+x-1)//x
print(4+max(map(f,ds)))

Solution (Python):

import itertools
import math

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

ans = 10000000000000000000

bn = max([math.ceil(N/t) for t in times])

print(bn + 4)

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

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

if min_int >= N:
    print(5)
else:
    if N%min_int == 0:
        aaa = N // min_int
        print(4+aaa)
    if N%min_int != 0:
        aaa = N // min_int
        print(5+aaa)

Solution (Python):

import sys
import math

def solve(N: int, A: int, B: int, C: int, D: int, E: int):
    cost = [A,B,C,D,E]
    cost.sort()
    max = math.ceil(N/cost[0])
    print(max + 4)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    A = int(next(tokens))  
    B = int(next(tokens))  
    C = int(next(tokens))  
    D = int(next(tokens))  
    E = int(next(tokens))  
    solve(N, A, B, C, D, E)

if __name__ == '__main__':
    main()

Solution (Python):

import math

n = int(input())

time = []

for _ in range(5):
    temp = int(input())
    time.append(temp)
    
if min(time) >= n:
    print(5)
else:
    print(math.ceil(n/min(time)) + 4)

Solution (Python):

"""
Created on Mon Apr  8 15:45:11 2019

@author: adachi-lab
"""

import math
N = int(input())

T = 0
A = []


for i in range(5):
    X = int(input())
    A.append(X)
    
W1 = A.index(min(A))


T = math.ceil(N/A[W1])+4

print(T)

Solution (Python):
N=int(input())
L=[int(input()) for _ in range(5)]
print(5 if min(L)>=N else 4 -((-N)//min(L)))

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

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

if min_int >= N:
    print(5)
else:
    if N%min_int == 0:
        aaa = N // min_int
        print(4+aaa)
    if N%min_int != 0:
        aaa = N // min_int
        print(5+aaa)

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

ans = ( N // min(A, B, C, D, E)) + 4


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

if N % x == 0:
	ans += 0
		
else:
	ans += 1
		
	
print(ans)

Solution (Python):
from sys import exit
from math import ceil

N = int(input())
ABCDE = [int(input()) for _ in range(5)]
mostn = min(ABCDE)
print(ceil(N/mostn) + 4)

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

for i in range(5):
  if i==0:
    a=int(input())
  else:
    b=int(input())
    if b<a:
      a=b
print(math.ceil(N/a)+4)

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

mini = min(a)
print(N // mini + (5 if N % mini != 0 else 4))

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

Solution (Python):
import numpy as np
n = int(input())
l = np.array([int(input()) for _ in range(5)])
t = n / l
t = np.ceil(t)
t.sort()
t = t[::-1]

print(int(t[0]+4))

Solution (Python):
def main():
    n = int(input())
    a = [int(input()) for _ in range(5)]
    if not [i for i in a if i < n]:
        print(5)
        return
    b = n / min(a)
    if int(b) != b:
        b = int(b) + 1
    else:
        b = int(b)
    print(b + 4)


main()

Solution (Python):


import re

n = int(input())
p = []
min = 1000000000000000

for i in range(5):
    x = int(input())
    p.append(x)
    if(min > x):
        min = x

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

Solution (Python):


n=int(raw_input())
m=min([int(raw_input()) for i in xrange(5)])
print (m+n-1)/m+4

Solution (Python):
def getInt(): return int(input())
def getIntList(): return [int(x) for x in input().split()]
def zeros(n): return [0]*n

def zeros2(n, m): return [zeros(m) for i in range(n)] 

INF = 10**18

class Debug():
    def __init__(self):
        self.debug = True
 
    def off(self):
        self.debug = False
 
    def dmp(self, x, cmt=''):
        if self.debug:
            if cmt != '':
                w = cmt + ': ' + str(x)
            else:
                w = str(x)
            print(w)
        return x

def prob():
    d = Debug()
    d.off()
    N = int(input())
    xport = zeros(5)
    for i in range(5):
        xport[i] = int(input())
    d.dmp((xport),'xport')
    minCapa = INF
    for i in range(5):
        minCapa = min(minCapa, xport[i])
    d.dmp((minCapa),'minCapa')
    minutes = 4
    minutes += (N+minCapa-1)//minCapa
    d.dmp((minutes),'minutes')
    return minutes
    

ans = prob()
print(ans)

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

x = min(a)

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

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

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=4+n//x
else:
    y=5+n//x
print(y)

Solution (Python):
import math

def main():
    """ 以下にコードを書いてください """
    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)

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

    print(ans)


if __name__ == "__main__":
    main()

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

tmp = min(max_available)
if tmp >= N:
    print(5)
else:
    print(4 + (N + tmp - 1) // tmp)

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

list_trans.sort()

if N % list_trans[0] == 0:
	time = N // list_trans[0]
elif N % list_trans[0] != 0:
	time = N // list_trans[0] + 1
print(time + 4)

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

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

X=np.asarray([A,B,C,D,E])
X=np.sort(X)
if N%X[0]==0:
	y=N//X[0]
elif N%X[0]!=0:
	y=N//X[0]+1
print(y+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())
capacity_list = [int(input()) for _ in range(5)]
capacity_list.sort()
bottle_neck = capacity_list[0]
print(4+int((N+bottle_neck-1)/bottle_neck))

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

Solution (Python):
import math

A = []
N = int(input())
for i in range(5):
    a = int(input())
    A.append(a)
min_t = min(A)
"""
if N % min_t == 0:
    a = N // min_t
else:
    a = N // min_t + 1
"""
a = math.ceil(N / min_t)
print(a + 4)

Solution (Python):
import math

N, A, B, C, D, E = eval("int(input())," * 6)

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

Solution (Python):


def main():
    N = int(input())
    d = []
    for _ in range(5):
        d.append(int(input()))
    print(-(-N // min(d)) + 4)


if __name__ == '__main__':
    main()

Solution (Python):
import math

N=int(input().strip())
a=[0]*5
ans=0
for i in range(5):
    a[i]=int(input().strip())

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

Solution (Python):
import math

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

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

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

import math

x = math.ceil(n / (min([a, b, c, d, e])))

print(x + 4)

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

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

Solution (Python):



import math


n = int(input())
capacity = []
for _ in range(5):
  capacity.append(math.ceil(n / int(input())))

ans = 5 + capacity[0]-1
mn = capacity[0]
for i in capacity[1:]:
  if mn < i:
    ans += i - mn
    mn = i
print(ans)

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

N = int(input())

mini = min([int(input()) for _ in range(5)])

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

Solution (Python):
import math

N = int(input())
list = []
min = 0
for i in range(5):
  list.append(int(input()))
  if min > list[i] or i == 0:
    min = list[i]

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

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

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

bottleneck = min(time)
print(-(-N // bottleneck) + 4)

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(5)]
q_max = 0
res = 5
for i in range(len(a)):
  q = n // a[i]
  r = n % a[i]
  if r > 0:
    q_max = max(q_max, q)
  else:
    q_max = max(q_max, q - 1)
print(res + q_max)

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


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
li = [int(input()) for _ in range(5)]
li2 = [int(n/li[i]) if n%li[i]!=0 else int(n/li[i])-1 for i in range(5)]

print(5+max(li2))

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

output = N % min(a)
output = N // min(a) + 1 if output > 0 else N // min(a)
print(output + 4)

Solution (Python):
import math
n = int(input())
cnt = 4
a = int(input())
min = a

for i in range(4):
	b = int(input())
	if b < min:
		min = b

cnt += math.ceil(n / min)

print(cnt)

Solution (Python):
import sys
import math


def main():
    n = int(sys.stdin.readline())
    move = [int(x) for x in sys.stdin.readlines()]
    min_move = min(move)
    print(math.ceil(n/min_move) + 4)


if __name__ == "__main__":
    main()

Solution (Python):
import math

n = int(input())
transports = list()

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

Solution (Python):
import math

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

neck = min(caps)
ans = 5 + math.ceil(N/neck) - 1

print(ans)

Solution (Python):
import math

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

tr = [A,B,C,D,E]
ls = []

for i in range(0,5):
    ls.append([tr[i],i])

m = min(ls)[0]
i = min(ls)[1]

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

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

nar = min(l)
print((n//nar+bool(n%nar))+4)

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

Solution (Python):
import math
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(math.ceil(n / min) + 4)

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

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

seiyaku = min(a)

print(-(-N // seiyaku)+4)

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

Solution (Python):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
s = min(A, B, C, D, E)
if N % s == 0:
    print(N // s + 4)
else:
    print(N // s + 5)

Solution (Python):
n, a, b, c, d, e = [int(input()) for _ in range(6)]
n -= 1
print(max([n // a , n // b, n // c, n // d, n // e]) + 5)

Solution (Python):
n=int(input())
a=[int(input()) for _ in range(5)]
import math
print(math.ceil(n/min(a))+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)

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

Solution (Python):
import math
N = int(input())
trans = [int(input()) for _ in range(5)]
maxi = 0
for item in trans:
  k = math.ceil(N / item)
  maxi = max(maxi, k)
print(maxi + 4)

Solution (Python):
import math
n = int(input())
citys = [int(input()) for _ in range(5)]
citys = sorted(citys)
print(math.ceil(n/citys[0])+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)
x=n/m
y=n//m
if x==y:
  print(int(4+x))
else:
  print(int(5+y))

Solution (Python):


from numpy import array, zeros
IN_RANGE = 5



N = int(input())
a_e = array([int(input()) for i in range(IN_RANGE)])


minute = 4 + -(- N // a_e.min())
print(minute)

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

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

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

minMove = min(li)

import math
ans = math.ceil(n / minMove) + 4

print(ans)

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

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
li = [a,b,c,d,e]

m = min(li)

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

Solution (Python):
import math

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

times = [A, B, C, D, E]

result = math.ceil((N / min(times))) + 4
print(result)

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

lst=[A,B,C,D,E]
neck=min(lst)
ans=N//neck+5
if N%neck==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(int((N-1)/min(a,b,c,d,e))+5)

Solution (Python):
def main():
    N = int(input())
    capacity = [None] * 5
    min_cap = float('inf')
    for i in range(5):
        capacity[i] = int(input())
        if capacity[i] < min_cap:
            min_cap = capacity[i]
    time = N // min_cap
    if N % min_cap > 0:
        time += 1
    print(time + 4)
    return

main()

Solution (Python):
import sys, os

if __name__=='__main__':
    if 'local' in os.environ :
        sys.stdin = open('./input.txt', 'r')
    
    n = int(input())
    ma = int(1e15)
    for i in range(5):
        ma = min(ma, int(input()))
    
    print(4 + (n +ma-1)//ma)

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

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

if N % min_capacity == 0:
    ans = N // min_capacity + 4
else:
    ans = N // min_capacity + 5

print(ans)

Solution (Python):
a,*b=eval('int(input()),'*6);print(4--a//min(b))

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

ans=4+n//m + (0 if n%m==0 else 1)

print(ans)

Solution (Python):
n,*a=eval('int(input()),'*6);print(4--n//min(a))

Solution (Python):
n,*a=eval('int(input()),'*6);print(4--n//min(a))

Solution (Python):



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

min_ae = min(a_e)

arr_city1 = n // min_ae if n % min_ae == 0 else n//min_ae + 1
ans = arr_city1 + 4
print(ans)

Solution (Python):
import numpy as np
def solve(n, c):
    i = np.argmin(c)
    m = len(c)
    return m - 1 + (n + c[i] - 1) // c[i]

n = int(input())
c = [int(input()) for i in range(5)]
print(solve(n, c))

Solution (Python):
import math

N = int(input())
maxmembers={}
for i in range(5):
    maxmembers[i] = int(input())


'''
citypeople = [N,0,0,0,0,0]
flag = bool(False)
time = 0

for i in range(6):
    print(citypeople[i],end=' ')
print('')

while True:
    for i in reversed(range(1,6)):
        if citypeople[i-1] > maxmembers[i-1]:
            citypeople[i] += maxmembers[i-1]
            citypeople[i-1] -= maxmembers[i-1]
        else:
            citypeople[i] += citypeople[i-1]
            citypeople[i-1] = 0
    time += 1
    
    for i in range(6):
        print(citypeople[i],end=' ')
    print('')
    
    if citypeople[5] == N:
        break

print(time)
'''

mintransportation = maxmembers[0]
for i in range(1,5):
    if maxmembers[i] < mintransportation:
        mintransportation = maxmembers[i]

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

Solution (Python):

N = int(input())
maxmembers={}
for i in range(5):
    maxmembers[i] = int(input())


'''
citypeople = [N,0,0,0,0,0]
flag = bool(False)
time = 0

for i in range(6):
    print(citypeople[i],end=' ')
print('')

while True:
    for i in reversed(range(1,6)):
        if citypeople[i-1] > maxmembers[i-1]:
            citypeople[i] += maxmembers[i-1]
            citypeople[i-1] -= maxmembers[i-1]
        else:
            citypeople[i] += citypeople[i-1]
            citypeople[i-1] = 0
    time += 1
    
    for i in range(6):
        print(citypeople[i],end=' ')
    print('')
    
    if citypeople[5] == N:
        break

print(time)
'''

mintransportation = maxmembers[0]
for i in range(1,5):
    if maxmembers[i] < mintransportation:
        mintransportation = maxmembers[i]

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

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

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

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

city = sorted(city)

ans = ((N+city[0]-1) // city[0]) + 4
    
print(ans)

Solution (Python):
import sys
aD = [int(_) for _ in sys.stdin.readlines()]
def fCeil(a):
    a *= 10
    return int(a // 10 + 1 if a % 10 else a // 10)
print(max( fCeil(aD[0]/_) for _ in aD[1:]) +4)

Solution (Python):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=int(input())
 
print((a-1) // min(b,c,d,e,f) + 5)

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

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

Solution (Python):
n, a, b, c, d, e = [int(input()) for _ in range(6)]
m = min(a, b, c, d, e)
print((n - 1) // m + 5)

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 sys
import math
sys.setrecursionlimit(20000000)
input = sys.stdin.readline
n = int(input())
a = [int(input()) for i in range(5)]
a = min(a)
print(4+math.ceil(n/a))

Solution (Python):
import numpy as np
import math

n = int(raw_input())
a = []
for i in range(5):
	a.append(int(raw_input()))
b = np.array(a)
print int(math.ceil(n *1. / np.min(b))) + 4

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

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

Solution (Python):
import math

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

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

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

Solution (Python):
import math

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

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

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

Solution (Python):
import math
N=int(input())
A=[int(input()) for _ in range(5)]
MA=min(A)
if MA == N:
  N = 0

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

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

Solution (Python):
import math


N, *capacity = [int(input()) for _ in range(6)]



ans = math.ceil(N/min(capacity))

print(ans+4)

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

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

Solution (Python):
N = int(input())
m = min([int(input()) for i in range(5)])
print(N // m + (N % m != 0)*1 + 4)

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

Solution (Python):
from math import ceil


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


bottle_neck = min(lst_AtoE)
ans = ceil(N / bottle_neck) + 4
print(ans)

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

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

a,b = divmod(N,min(A,B,C,D,E))
print(4 + a + (1 if b != 0 else 0))

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


bottle_neck = min(lst_AtoE)
bottle_neck_time = N//bottle_neck if N % bottle_neck==0 else (N//bottle_neck + 1)
ans = bottle_neck_time + 4
print(ans)

Solution (Python):



def main():
    from math import ceil

    n = int(input())
    alpha = [int(input()) for _ in range(5)]
    print(max(0, ceil(n / min(alpha)) - 1) + 5)


if __name__ == '__main__':
    main()

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(max(N/A, N/B, N/C, N/D, N/E)) + 4)

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

Solution (Python):
from math import *

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

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

Solution (Python):
import math

N = int(input())
min_road = N
ABCDE = [int(input()) for _ in range(5)]
for i, element in enumerate(ABCDE):
    min_road = min(min_road, element)

ans = int(math.ceil(N / min_road)) + 4
print(ans)

Solution (Python):
import math

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

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

Solution (Python):
import math

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

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

Solution (Python):


import sys
import copy

input = sys.stdin.readline



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

minV = min(a)

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

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

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

m = min(trans)
ans = int((n + m - 1) / m) + 4
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-1)//m)+5)

Solution (Python):
import math

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

min_num_person = min(num_person)

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

Solution (Python):
import math
array1 = [int(input()) for i in range(6)]
array2 = array1[1:6]
num = array1[0]
minimum = min(array2)
print(math.ceil(num / minimum) + 4)

Solution (Python):
n,*a=[int(input()) for i in range(6)]
m=sorted(a)[0]
print(n//m+5 if n%m>0 else n//m+4)

Solution (Python):
from sys import stdin

def ria(sep = ''):
    if sep == '' :
        return list(map(int, input().split())) 
    else: return list(map(int, input().split(sep)))
def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()

N = ri()
A = [0] * 5
for i in range(5): A[i] = ri()

prev = N
head = 0
tail = 0
for i in range(5):
    if(A[i] >= prev):
        nhead = head + 1
        ntail = tail + 1
        head = nhead
        tail = ntail
    else :
        nhead = head + 1
        ntail = head + (N + (A[i] - 1)) // A[i]
        head = nhead
        tail = ntail
    
    prev = min(prev, A[i])
print (tail)

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())
cost = [int(input()) for i in range(5)]
mn = min(cost)
print((N + mn - 1) // mn + 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 numpy as np

N = int(input())
M = 5
data = [int(input()) for i in range(M)]
lowest_index = np.argmin(data)

sum = int(np.ceil(N / data[lowest_index])) + 4
print(sum)

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

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

arr = [A,B,C,D,E]
key = arr.index(min(arr))

ans = 4 + ((N + arr[key] - 1) // arr[key])

print(ans)

Solution (Python):
import math

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

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

Solution (Python):
import math

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

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

Solution (Python):
import math
population = int(input())
a2b = int(input())
b2c = int(input())
c2d = int(input())
d2e = int(input())
e2f = int(input())
city = [population,0,0,0,0,0]
vehicle = [a2b,b2c,c2d,d2e,e2f]
print(math.ceil(population/min(vehicle)) + 4)

Solution (Python):
import math
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
 
cs = [a,b,c,d,e]
 
min_cs = min(cs)
 
t = math.ceil(n / min_cs)

print(t + 4)

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

Solution (Python):
N = 6
a = [int(input()) for i in range(N)]
p = [a[0],0,0,0,0,0]
count = 0
b = min(a)
if a[0] <= b:
    ans = 5
else:
    ans = -1*(-1*a[0] // b) + 4
print(ans)

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

 


 
minT = min(T)

 
indminT = T.index(minT)

 
time = 1 + indminT - 1 + ((N-1)//minT) + 1 + 5 - (indminT + 1)
print(time)

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

Solution (Python):


from math import ceil

def main():
    N = int(input())
    data = [int(input()) for _ in range(5)]

    print(ceil(N / min(data)) + 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())
time= 0

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

time = (-(-n//minroute)) + 4

print(time)