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):
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right


from functools import reduce
from pprint import pprint

INF = float("inf")

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

def I():
    return int(input())

def MI():
    return map(int,input().split())

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

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def SI():
    return input()

def SMI():
    return input().split()

def SRI():
    return list(input().split())

def SCI(n):
    return [ input() for _ in range(n) ]

def SLI(n):
    return [ list(input().split()) for _ in range(n) ]

n = I()
abcde = CI(5)

m = min(abcde)

if m==1:
    ans = n + 4
elif m>n:
    ans = 5
else:
    ans = (n//m) + 1 + 4
print(ans)

Solution (Python):
import math



def modelAnswer(argv:list) -> int:
   return math.ceil(argv.pop(0) / min(argv)) + 4
def main():
   argv = [int(input()) for _ in range(6)]
   print(modelAnswer(argv))

if __name__ == '__main__':
   main()

Solution (Python):
import math
n = int(input())
a = [int(input()) for i 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(4 + math.ceil(n/min(A)))

Solution (Python):


import sys
import math





















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n = ii()
    L = [ii() for _ in range(5)]
    min_ind = 0
    minimum = inf
    for i in range(5):
        if L[i] < minimum:
            min_ind, minimum = i, L[i]
    print(min_ind + math.ceil(n / minimum) + (4 - min_ind))

if __name__ == "__main__":
    main()

Solution (Python):
import sys



import math







stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def main():
    n = int(stdin.readline().rstrip())
    a = int(stdin.readline().rstrip())
    b = int(stdin.readline().rstrip())
    c = int(stdin.readline().rstrip())
    d = int(stdin.readline().rstrip())
    e = int(stdin.readline().rstrip())
    m = min(a,b,c,d,e)
    u = math.ceil(n/m)
    print(4 + u)

main()

Solution (Python):
n = int(input())
l = [int(input()) for _ in range(5)]
bottle = min(l)
print(4 + (n // bottle) + (n % bottle != 0))

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

Solution (Python):
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
def main():
    n=I()
    trans=[I(),I(),I(),I(),I()]
    trans.sort()
    print(n//trans[0]+5 if n/trans[0]%1!=0 else n//trans[0]+4)
    

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
t_list = [int(input()) for nesya in range(5)]
z = min(t_list)
for t in t_list:
  if z == t:
    if n%t == 0:
      t_ = n//t
    else:
      t_ = n//t+1
    print(t_ + 4)
    break

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

Solution (Python):

import sys


def solve(N: int, A: int, B: int, C: int, D: int, E: int):
    print(-(-N // min(A, B, C, D, E)) + 4)


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

Solution (Python):

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

m=min(l)

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

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

p_min = min(p_list)
n = N // p_min
if N % p_min == 0:
    n -= 1
ans = n + 5

print(ans)

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

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

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

print(-(-n//min(capacity))+4)

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


n = I()
A = IR(5)
m = min(A)
print(4+ceil(n/m))

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

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




'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''

import math
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
root = [a, b, c, d, e]
minn=min(root)








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

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

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

def main():
    N = int(readline())
    A, B, C, D, E = [int(readline()) for _ in range(5)]
    res = -(-N // min(A, B, C, D, E)) + 4
    print(res)

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
from math import ceil
def input(): return sys.stdin.readline().strip()

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

    """
    最も定員人数が少ない乗り物を考える。（複数ある場合は一番左側にあるものを見る）
    それが定員x人で[i, i+1]区間を結んでいるとして、[0, i]区間の乗り物がどうなって
    いるかを無視しても、
        ・ある時間以降i+1の街にはx人ずつ降り立ち、
        ・i+1の街以降では乗り物待ちは発生しない。
    ことが分かる。

    よって求める時間は
        ・i街に誰かが来るまでの時間（i分）
        ・[i, i+1]区間でN人全員を送り出す時間（ceil(N / x)分）
        ・最後の人がi+1街から最後の町に到着するまでの時間（5 - i - 1分）
    を合計して
        i + ceil(N / x) + (5 - i - 1) = ceil(N / x) + 4
    となる。
    """

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


if __name__ == "__main__":
    main()

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

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

bn=-(-N//min(A))

print(bn+4)

Solution (Python):
N = int(input())
cnt = int()
A=[]
for i in range(5):
    A.append(int(input()))
A.sort()
print(-(-N//min(A))+4)

Solution (Python):
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)
print((n + min_val - 1) // min_val + 4)

Solution (Python):
N,*A=map(int,open(0));print(5+(N-1)//min(A))

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

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

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

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

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

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

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

Solution (Python):
n = int(input())
l = [int(input()) for i in range(5)]
l2 = []
for i in range(5):
    if n % l[i] == 0:
        l2.append(n // l[i])
    else:
        l2.append(n // l[i] + 1)
l2.sort(reverse = True)
print(l2[0] + 4)

Solution (Python):
N = int(input())
A,B,C,D,E = map(int,[input() for i in range(5)])
ans = 0
def mymax(s):
    res = N//s
    if N%s==0:
        return res
    else:
        return res+1

k = max(mymax(A),mymax(B),mymax(C),mymax(D),mymax(E))
print(k+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]
m=min(l)
index=l.index(m)
print((n-1)//m+1+4)

Solution (Python):
import math

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

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

l = [None] * 5

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

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

Solution (Python):
n = int(input())
abcde = [int(input()) for i in range(5)]
minabcde = 10**16
for i in abcde:
         if minabcde > i:
                  minabcde = i
print((n+minabcde-1)//minabcde + 4)

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

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

Solution (Python):
n = int(input())
trans = [ int(input()) for i in range(5) ]
trans = [ (n + i - 1) // i for i in trans]
print(max(trans) + 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):
import math


def main():
    N = int(input())
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())
    E = int(input())
    min_capa = min([A, B, C, D, E])
    print(math.ceil(N / min_capa) + 4)


if __name__ == '__main__':
    main()

Solution (Python):
import itertools
import math

n = int(input())
p = []
p.append(int(input()))
p.append(int(input()))
p.append(int(input()))
p.append(int(input()))
p.append(int(input()))


time = math.ceil(n / min(p))

print(4+time)

Solution (Python):
import math

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

neck = min(s)
time = 0
time += s.index(neck)
time += math.ceil(n/neck)
time += 4-s.index(neck)

print(time)

Solution (Python):
import math

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

M = min(numbers)

A = 5 + math.ceil(N / M) -1
print(A)

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7


n=I()
u=[I() for i in range(5)]
ans=5-1+ceil(n/min(u))

print(ans)

Solution (Python):
import math
n = int(input())
ma = 0
for i in range(5):
    a = int(input())
    if ma < math.ceil(n/a):
        ma = math.ceil(n/a)
print(ma+4)

Solution (Python):
import math

def main():
    N = int(input())
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())
    E = int(input())

    capa = [A, B, C, D, E]
    time = math.ceil(N / min(capa)) + len(capa) - 1
    print(time)

if __name__ == '__main__':
    main()

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):
import math
n = int(input())
l = []
for i in range(5):
  l.append(int(input()))
if min(l)>=n:
  print(5)
else:
  print(math.ceil(n/min(l))+4)

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

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

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

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

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


abc = [int(input()) for i in range(5)]
_min = min(abc)
min_idx = abc.index(min(abc))
count = math.ceil(n/_min)
count += min_idx+(4-min_idx)
print(count)

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

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

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

costs.sort()
ans = 5

if costs[0] < n:
    if n % costs[0] == 0:
        ans += n // costs[0] - 1
    else:
        ans += n // costs[0]
print(ans)

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

Solution (Python):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
ABCDE = [A,B,C,D,E]

min_abcde = min(ABCDE)

if N % min_abcde == 0:
    X = N // min_abcde
else:
    X = (N // min_abcde) + 1

print(X+4)

Solution (Python):
import math

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

x = min(l)

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

Solution (Python):
import math

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


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

print(ans)

Solution (Python):
n = int(input())
people_restriction = [0]*5
for i in range(5):
    people_restriction[i] = int(input())
min_restriction = min(people_restriction)
city = people_restriction.index(min_restriction)

if n % min_restriction == 0:
    count = n//min_restriction
else:
    count = n//min_restriction + 1
ans = count + 4
print(ans)

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

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


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

print(ans)

Solution (Python):
n = int(input())
a = [0] * 5
for i in range(5):
    a[i] = int(input())
ans = [[0,0] for i in range(5)]
ans[0] = [0,(n + a[0] -1)//a[0]]
for i in range(1,5):
    if a[i] < a[i - 1]:
        ans[i] = [ans[i-1][0]+1, max(ans[i-1][0]+1 + (n + a[i] -1 )//a[i],ans[i-1][1] + 1)]
    else:
        ans[i] = [ans[i-1][0]+1,ans[i-1][1] + 1]
print(ans[4][1])

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

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

MIN = min(Z)
ans = (N+MIN-1)//MIN + 4
print(ans)

Solution (Python):
import math

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

MIN = min(Z)
ans = math.ceil(N/MIN) + 4
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)+1+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):
from math import ceil
temp_list = [int(input()) for _ in range(6)]
n = temp_list.pop(0)
print(4 + ceil(n / min(temp_list)))

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

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

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

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

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

Solution (Python):
N = int(input())
neck = 10 ** 16
for _ in range(5):
    neck = min(neck, int(input()))
print(((N + neck - 1) // neck) - 1 + 5)

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

Solution (Python):
import math
import sys

input = sys.stdin.readline

def main():
    N = int(input())
    t = []
    for _ in range(5):
        t.append(int(input()))
    wait = [math.ceil(N/x) for x in t]
    maxwait = max(wait)
    ans = 5 + maxwait - 1
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
from sys import stdin
import math


def main():
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  
    dist = []
    for i in range(5):
        _ = int(_in[i+1])  
        dist.append(_)
    
    t = [0] * 5
    num = N
    for i in range(5):
        t[i] = math.ceil(num/dist[i])
        if i<4:
            num = num%dist[i]+max((N-num%dist[i])-dist[i+1]*(sum(t)-i-1),0)
    cnt = sum(t)
    
    print(cnt)



if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  
    dist = []
    for i in range(5):
        _ = int(_in[i+1])  
        dist.append(_)
    
    cnt = math.ceil(N/min(dist))+4
    
    print(cnt)

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)
print((n + x - 1) // x + 4)

Solution (Python):
from math import ceil
P = [int(input()) for _ in range(6)]
N,A,B,C,D,E = P[0],P[1],P[2],P[3],P[4],P[5]
N2,N3,N4,N5,N6 = ceil(N/A),ceil(N/B),ceil(N/C),ceil(N/D),ceil(N/E)

ans = max(N2,N3,N4,N5,N6) + 4
print(ans)

Solution (Python):


import math


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


min_pos = 0
for i in range(5):
    if trans[min_pos]>trans[i]:
        min_pos = i


time_1 = min_pos
time_2 = math.ceil(N/trans[min_pos])
time_3 = 6 - (min_pos + 2)
ans = time_1 + time_2 + time_3


print(ans)

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

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

def calc(A):
    if N%A==0:
        return N//A
    else:
        return N//A+1
a=calc(A)
b=1+max(a, calc(B))
c=2+max(b-1,calc(C))
d=3+max(c-2, calc(D))
e=4+max(d-3, calc(E))
print(e)

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

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


if __name__ == '__main__':
    main()

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

Solution (Python):
N,*I=[int(input()) for _ in range(6)]
mn=min(I)
print(5+(N+mn-1)//mn-1)

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

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

max_ = -1
for l in L:
    if n <= l:
        continue
    else:
        q, r = divmod(n, l)
        if r == 0:
            max_ = max(max_, q-1)
        else:
            max_ = max(max_, q)
if max_ != -1:
    ans += max_
print(ans)

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

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

tmp = min(ABCDE)

ans = (N + tmp - 1) // tmp + 4

print (ans)

Solution (Python):
n,a,b,c,d,e = [int(input()) for i in range(6)]
m = min(a,b,c,d,e)
k = 0--n//m
print(k+4)

Solution (Python):
from math import ceil


def main():
    n = int(input())
    required_times = [int(input()) for _ in range(5)]
    groups = ceil(n / min(required_times))
    print(groups + 4)


if __name__ == '__main__':
    main()

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

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(5)]
a = min(A)
n=N//a
if N%a>0:
    n += 1
print(5+n-1)

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

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

m = min(arr)
ans = n//m + 5

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

Solution (Python):
import math
n = int(input())
a_e_list = []
for i in range(5):
  a_e_list.append(int(input()))
score = 0  
for i in range(5):
  if i == 0:
    score += math.ceil(n /a_e_list[0])
  else:
    s = n - a_e_list[i] * (score - i)
    if s <= 0:
      score += 1
    else:
      score += math.ceil(s/a_e_list[i])

      
print(score)

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

tmp = min(A, B, C, D, E)
res = N // tmp + int(N % tmp != 0) + 4

print(res)

Solution (Python):


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

m = min(t)
print((n+m-1)//m - 1 + 5 )

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_ls = [int(input()) for _ in range(5)]
neck_times = -(-n // min(a_ls))
ans = 4 + neck_times
print(ans)

Solution (Python):
n, a, b, c, d, e = map(int, open(0).read().split())
small = min(a, b, c, d, e)
print(-(-n // small) + 4)

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

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

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

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

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

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

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

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

Solution (Python):
n = int(input())
cs = []
for i in range(5):
  city = int(input())
  cs.append(city)
m = min(cs)
if m >= n:
  ans = 5
elif m != 1:
  ans = (n + m - n%m) / m + 4
elif m == 1:
  ans = n + 4
print(int(ans))

Solution (Python):
import math
n = int(input())
bottleneck = 10**100
for i in range(5):
    x = int(input())
    if x <= bottleneck:
        bottleneck = x
print(4 + math.ceil(n / bottleneck))

Solution (Python):
import math
people = int(input())
lst = []
for i in range(5):
  lst.append(int(input()))
temp = min(lst)
time = 5 + math.ceil(people/temp) - 1
print(time)

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

Solution (Python):
n,*l=map(int,open(0).read().split());print((n-1)//min(l)+5)

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

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

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

Solution (Python):
N = int(input())
quank = [int(input()), int(input()), int(input()), int(input()), int(input())]
b = min(quank)
if N % b == 0:
    a = N//b
else:
    a = N//b + 1
print(a+4)

Solution (Python):
import math

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

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

min_num = min(nums)
ans = 5 + (math.ceil(N/min_num) - 1)

print(ans)

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

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

Solution (Python):

import io
import math

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

Solution (Python):

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

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

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

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

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

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

if stop >= n:
    print(5)
    exit()

print(4+(-1*((-1*n)//stop)))

Solution (Python):
import sys
import math

X = list(map(int, sys.stdin.readlines()))
N = X[0]
min_transport = min(X[1:])

print(5 + (math.ceil(N / min_transport)) - 1)

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

Solution (Python):
import sys
import math

from collections import defaultdict
from collections import deque
def load(vtype=int):
    return vtype(input().strip())
    
n = load()
li = []
for _ in range(5):
    li.append(load())

mn = min(li)
mni = li.index(mn)

ans = math.ceil(n / mn) + mni + (5-mni-1)
print(ans)

Solution (Python):
import sys
from io import StringIO
import unittest
import math

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

    min_a = min(a)

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

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """5
3
2
4
3
5"""
        output = """7"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """10
123
123
123
123
123"""
        output = """5"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """10000000007
2
3
5
7
11"""
        output = """5000000008"""
        self.assertIO(input, output)

if __name__ == "__main__":
    
    resolve()

Solution (Python):
import math


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

Solution (Python):
a = [int(input()) for _ in range(6)]
mina = a[1]
for i in range(2,6):
    if mina > a[i]: mina = a[i]
print(-(-a[0]//mina)+4)