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.



Sample input:
5
3
2
4
3
5


Sample output:
7

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N,A,B,C,D,E=map(int,open(0).read().split())
    last_A = ceil(N,A)
    last_B = max(ceil(N,B)+1, last_A+1)
    last_C = max(ceil(N,C)+2, last_B+1)
    last_D = max(ceil(N,D)+3, last_C+1)
    last_E = max(ceil(N,E)+4, last_D+1)
    print(last_E)

    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

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

t_list = [A, B, C, D, E]
min_t = min(t_list)
min_i = 0

t_1 = math.ceil(N/min_t)
t_1 = int((N+min_t-1) / min_t)
print(t_1+4)

Submission status: Accepted

Solution code:
N = int(input())
carry = [int(input()) for _ in range(5)]
min_carry = min(carry)
print((N + min_carry - 1) // min_carry + 4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
def main():
    N=int(input())
    A=int(input())
    B=int(input())
    C=int(input())
    D=int(input())
    E=int(input())
    min_num=N+1
    for i in (A,B,C,D,E):
        min_num=min(i,min_num)
    print(math.ceil(N/min_num)+4)
    
if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
# 2020/02/22
# AtCoder Beginner Contest 123 - C

import math

# Input
n = int(input())
ae = list()
for i in range(5):
    ae.append(int(input()))

# Calc
ans = math.ceil(n / min(ae)) + 4

# Output
print(ans)

Submission status: Accepted

Solution code:
# 2020/02/22
# AtCoder Beginner Contest 123 - C

# Input
n = int(input())
ae = list()
for i in range(5):
    ae.append(int(input()))

# Calc
minae = min(ae)
ans = n // minae + 4
if n % minae > 0:
    ans = ans + 1

# Output
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
time = min(a, b, c, d, e)
if n < time:
    print(5)
else:
    print(math.ceil(n / time) + 4)

Submission status: Accepted

Solution code:
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])
q = n//x
r = n%x

if r == 0:
    ans = 5 + q-1
else:
    ans = 5 + q
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
MIN = float("inf")
for _ in range(5):
    MIN = min(MIN, int(input()))

from math import ceil

print(ceil(N / MIN) + 4)

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))

n = ni()
a = []
for _ in range(5):
    a.append(ni())

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

Submission status: Accepted

Solution code:
N = int(input())
abcde = [int(input()) for _ in range(5)]
m = min(abcde)

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n, *a = map(int, open(0).read().split())
b = min(a)
print(4 + (n+b-1)//b)

Submission status: Accepted

Solution code:
N,A,B,C,D,E = [int(input()) for _ in range(6)]
btm = min(A,B,C,D,E)
res = N-(N//btm)*btm
ans = 4+N//btm
if res:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
time =0
amin = min(a,b,c,d,e)
time=(n//amin+1 if n%amin != 0 else n/amin)+4
print(int(time))

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
li = [a,b,c,d,e]
li_min = min(li)
ans = int(np.ceil(n/li_min)) + 4
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n = int(input())
lis = [int(input()) for _ in range(5)]
l = len(lis)
m = min(lis)
if n > m:
    l += math.ceil((n-m)/m)
print(l)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
toshi = []
for i in range(5):
    toshi.append(int(input()))
#ここまで入力
mn = min(toshi)
ans = n//mn+4
if n%mn:
    ans += 1
print(ans)

Submission status: Accepted

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

Min = min(A,B,C,D,E)
L = M.count(Min)
    
if N % Min == 0:
    Ans = N//Min + 4
else:
    Ans = N//Min + 5
print(Ans)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

n=ii()
arr=lin(5)
num=min(arr)
if n <=num:
    print(5)
else:
    print(4+ceil(n/num))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def solve():
    N = int(input())
    ABCDE = []
    for _ in range(5):
        ABCDE.append(int(input()))
        
    min_ = min(ABCDE)
    
    print(math.ceil(N/min_)+4)
    
solve()

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

import math

a = math.ceil(N/A)
b = math.ceil(N/B)
c = math.ceil(N/C)
d = math.ceil(N/D)
e = math.ceil(N/E)

#print(a,b,c,d,e)
f = max([a,b,c,d,e])
print(f+4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
cap = [int(input()) for _ in range(5)]

min_cap = min(cap)

if n <= min_cap:
    print(5)
else:
    if (n - min_cap) % min_cap == 0:
        r = 0
    else:
        r = 1
    print((n - min_cap) // min_cap + r + 5)

Submission status: Accepted

Solution code:
import math

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
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:
    print(N//X+5)
else:
    print(N//X+4)

Submission status: Accepted

Solution code:
n = int(input())
l = [int(input()) for _ in [0] * 5]


if int(n / min(l)) != n / min(l):
    print(int(n / min(l)) + 1 + 4)
else:
    print(int(n / min(l)) + 4)

Submission status: Accepted

Solution code:
N,A,B,C,D,E=[int(input()) for _ in range(6)]
x=min(A,B,C,D,E)
ans=(N-1)//x +5
print(ans)

Submission status: Accepted

Solution code:
n,*L = map(int,open(0).read().split())

print(n//min(L) + 5 if n%min(L)!=0 else n//min(L) +4)

Submission status: Accepted

Solution code:
N = int(input())
C = [int(input()) for i in range(5)]
print(5 + N//min(C) - (N % min(C) == 0))

Submission status: Accepted

Solution code:
n=int(input())
cap=[int(input()) for i in range(5)]
m=min(cap)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
lis = []
n = int(input())
for i in range(5):
    lis.append(int(input()))

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

Submission status: Accepted

Solution code:

def ceil(x, y):
    if x % y == 0:
        return x//y
    else:
        return (x//y)+1

def solve(n, xs):

   # 5
   #   3 2 4 3 5
   # [5,0,0,0,0,0]

   # [2,3,0,0,0,0]

   # [0,3,2,0,0,0]
   # [0,1,2,2,0,0]
   # [0,0,1,2,2,0]
   # [0,0,0,1,2,2]

   # [0,0,0,0,1,4]
   # [0,0,0,0,0,5]
    min_lim_cost = 10**15+1
    min_lim_pos = -1
    for i in range(5):
        if xs[i] < min_lim_cost:
            min_lim_pos = i
            min_lim_cost = xs[i]

    init_cost = min_lim_pos
    init_reach =  5 - min_lim_pos
    final_reach = ceil((n-min_lim_cost),min_lim_cost)

#    print(min_lim_cost,
#          min_lim_pos,
#          init_cost,
#          init_reach,
#          final_reach)
    return init_cost+init_reach+final_reach


if __name__ == '__main__':
    n = int(input())
    xs= []
    for _ in range(5):
        xs.append(int(input()))
    print(solve(n, xs))

Submission status: Accepted

Solution code:
from math import ceil
N = int(input())
L = [int(input()) for k in range(5)]
ans = 5
for k in range(5):
    ans = max(ans,4+ceil(N/L[k]))
print(ans)

Submission status: Accepted

Solution code:
N=int(input())
P=[0]*5
count=0
for i in range (5):
	P[i]=int(input())
for i in range (5):
	if P[i]>=N:
		count+=1
if count==5:
	print(5)
else:
	Q=sorted(P)
	if N%Q[0]==0:
		R=N//Q[0]
		print(R+4)
	else:
		R=N//Q[0]+1
		print(R+4)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    G = [int(input()) for i in range(5)]
    G = [(N+g-1)//g for g in G]
    print(max(G)+4)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
trans = [int(input()) for _ in range(5)]
x = min(trans)
t = n // x if n % x == 0 else n // x + 1
t += 4
print(t)

Submission status: Accepted

Solution code:
import math

n = int(input())  # 人数
l = [int(input()) for _ in range(5)]  # 移動時間
l_min = min(l)  # ボトルネック
time = math.ceil(n / l_min) + 4
print(time)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(input()) for i in range(5)]
t = [-(-n//i) for i in a]
max_t = max(t)
max_i = t.index(max_t)
print(max_t+4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A=[-(-N//int(input())) for _ in range(5)]
print(5+max(A)-1)

Submission status: Accepted

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

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

tmp = (n/bottle) - (n//bottle)
if tmp != 0:
    ans = (n // bottle) + 1
else:
    ans = n//bottle
print(ans + 4)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = []
for i in range(5):
    p.append(int(input()))
ans = 0
for i in range(5):
    t = i + (n+p[i]-1) // p[i]
    if t > ans:
        ans += t - ans
    else:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
ways = [int(input()) for i in range(5)]

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

Submission status: Accepted

Solution code:
import math
n,*l=map(int,open(0).read().split())
print(4+math.ceil(n/min(l)))

Submission status: Accepted

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

Submission status: Accepted

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

xs = [A, B, C, D, E]
min_value = min(xs)
min_index = xs.index(min_value)

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

Submission status: Accepted

Solution code:
n,*a=map(int,open(0).read().split());a=min(a);print(4+(n+a-1)//a)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(input()) for i in range(5)]
ma = min(a)
s = n // ma
if n % ma:
  s += 1
print(4 + s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
X = sorted([int(input()) for _ in range(5)])
print((N+(X[0]-1))//X[0]+len(X)-1)

Submission status: Accepted

Solution code:
N = int(input())
T = []
for i in range(5):
  c = int(input())
  T.append(N // c + 1 * (N % c != 0))
print(5 + max(T) -1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
people = np.array([int(input()) for _ in range(5)])

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

Submission status: Accepted

Solution code:
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(int(math.ceil(n/x) + 4))

Submission status: Accepted

Solution code:
import math

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

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

mini = min(Vehicle)

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

Submission status: Accepted

Solution code:
import sys
from math import ceil

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())

sys.setrecursionlimit(10 ** 9)


def main():
    N = INT()
    P = [INT() for _ in range(5)]
    print(ceil(N/min(P)) + 4)
    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
from math import ceil

def solve(n, a, b, c, d, e):
    return ceil(n / min([a, b, c, d, e]) + 4)

data = [int(input()) for _ in range(6)]
print(solve(*data))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ceil(a, b):
  return -(-a//b)

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

print(ceil(N, min_load) + 4)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

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

    min_i = 0
    min_v = AtoE[min_i]
    for i, v in enumerate(AtoE):
        if min_v > v:
            min_i = i
            min_v = v
    
    ans = 0
    for i, v in enumerate(AtoE):
        if min_i == i:
            ans += (N + v - 1 ) // v
        else:
            ans += (min_v + v - 1) // v
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
m = min(int(input()) for _ in range(5))
print(-(-n//m)+4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
T_list = [int(input()) for i in range(5)]

T_min = min(T_list)

#if N < T_min:
        #print('5')
#else:
print( (N+T_min-1) // T_min + 4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input().strip())
a = int(input().strip())
b = int(input().strip())
c = int(input().strip())
d = int(input().strip())
e = int(input().strip())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
lst = [ int(input()) for _ in range(5) ]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import _collections
import string

class cin():
    def int():
        return int(sys.stdin.readline().rstrip())
    def string():
        return sys.stdin.readline().rstrip()
    def mapInt():
        return [int(x) for x in cin.string().split()]
    def stringList(n):
        return [input() for i in range(n)]
    def intListList(n):
        return [cin.mapInt() for i in range(n)]
    def intColsList(n):
        return [int(input()) for i in range(n)]
        
class Math():
    def gcd(a,b):
        if b == 0:
            return a
        return Math.gcd(b,a % b)
    def roundUp(a,b):
        return -(-a // b)
    def toUpperMultiple(a,x):
        return Util.round_up(a,x) * x
    def toLowerMultiple(a,x):
        return (a // x) * x

def main():
    N = cin.int()
    A = cin.intColsList(5)
    M = min(A)
    print(Math.roundUp(N, M) + 4)
    return

if __name__ == "__main__":
    main()

Submission status: Accepted

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

arrived_time = -(-N//ABCDE[0])
for i in range(4):
  if ABCDE[i] <= ABCDE[i+1]:
    arrived_time += 1
    ABCDE[i+1] = ABCDE[i]
  else:
    num_left = N - (arrived_time - (i+1))*ABCDE[i+1]
    arrived_time += -(-num_left//ABCDE[i+1])
    
print(arrived_time)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def ceil(n,m):
    return int(math.ceil(n/m))

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

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


print(ceil(N,min(A))+4)

Submission status: Accepted

Solution code:
N = int(input())
member = [int(input()) for _ in range(5)]

m = min(member)

print(4 + (N + (m - 1)) // m)
# 6 6 6 6 6
# 10000 1 10000 10000 10000

# 3 2 4 3 5
# 5 4 3 3 2
#  1 1 1 1 2.5

# 11 7 5 3 2
#   1 1 1 1 500
# 10000000007
#  5000000003.5
#  5000000008

Submission status: Accepted

Solution code:
def read_values():
    return map(int, input().split())


def read_list():
    return list(read_values())


def main():
    N = int(input())
    m = 10 ** 15
    for _ in range(5):
        m = min(int(input()), m)
    
    print(5 + (N - 1) // m)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

mini=min(A)        
print(int((N-1)/mini)+5)

Submission status: Accepted

Solution code:
import sys
from math import ceil

n, *cap = map(int, sys.stdin.read().split())

def main():
    return 4 + ceil(n / min(cap))

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

Solution code:
import sys
from math import ceil

n, *cap = map(int, sys.stdin.read().split())

def main():
    min_cap = min(cap)
    i = cap.index(min_cap) + 1
    
    res = (i - 1) + ceil(n / min_cap) + (5 - i)
    return res

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

Solution code:
n = int(input())
min_n = int(input())
for _ in range(4):
    min_n = min(min_n, int(input()))
t = n // min_n
if n % min_n != 0:
    t += 1
print(t + 4)

Submission status: Accepted

Solution code:
from math import ceil; print(ceil(int(input()) / min([int(input()) for _ in range(5)])) + 4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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(-(-N//min)+4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())

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

def calculate(arr,n):
    minVal = min(arr)
    return int(((minVal + n - 1) / minVal) + 4)

result = calculate(arr,n)
print(result)

Submission status: Accepted

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

a = -(-N//A)
b = -(-N//B)
c = -(-N//C)
d = -(-N//D)
e = -(-N//E)

ans = 5 + max(a,b,c,d,e) - 1

print(ans)

Submission status: Accepted

Solution code:
from math import ceil


def main():
    N = int(input())
    capacity = []
    for _ in range(5):
        capacity.append(int(input()))
    min_capacity = min(capacity)
    if N <= min_capacity:
        print(5)
    else:
        print(4 + ceil(N / min_capacity))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

A = []
for _ in range(5):
  A.append(int(input()))
  
import math
L = math.ceil(N/min(A))

print(5 + L - 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8
import math
import heapq
import bisect
import numpy as np
#from scipy.misc import comb

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

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

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

Submission status: Accepted

Solution code:
N = int(input())
capacities = [int(input()) for _ in range(5)]
min_cap = min(capacities)
max_times = N // min_cap if N % min_cap == 0 else N // min_cap + 1
print(5 + max_times - 1)

Submission status: Accepted

Solution code:
import math
import numpy as np
from fractions import gcd
import fractions
import statistics
import collections
from functools import reduce
import itertools
 
N = int(input())
A = [int(input()) for i in range(5)]

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

Submission status: Accepted

Solution code:
import math
n = int(input())
traffics = []
for _ in range(5):
    traffics.append(int(input()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print((N // s + (N % s != 0) - 1) + 5)

Submission status: Accepted

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

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