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):
import sys
import math
sys.setrecursionlimit(10**6)
if sys.platform in (['ios','darwin','win32']):
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

N = INT()
A = INT()
B = INT()
C = INT()
D = INT()
E = INT()
F = [A, B, C, D, E]
G = [math.ceil(N/f)-1 for f in F]


print(5+max(G))

Solution (Python):
from math import ceil
n = int(input())
stp = []
for _ in range(5):
    stp.append(int(input()))

stp_min = stp.index(min(stp))
tim = ceil(n/min(stp)) + 4
print(tim)

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]
x=n//min(l)
if min(l)!=1:
    print(5+x)
else:
    print(4+x)

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())
x=min([int(input()) for _ in range(5)])
print(n//x+5 if x!=1 else n//x+4)

Solution (Python):
from collections import defaultdict,deque, Counter
import sys,heapq,bisect,math,itertools,string,queue,copy,time
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

n = inp()
mini = 10**15
for _ in range(5):
    temp = inp()
    if temp < mini: mini = temp

ans = n//mini + (n%mini != 0)+4
print(ans)

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

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

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

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

Solution (Python):
import math

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

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

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

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

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

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

Solution (Python):
import math

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

for _ in range(5):
    time.append(math.ceil(n / (int(input()))))
print(max(time) + 4)

Solution (Python):
import math

N = int(input())

A = [0] * 5

human_in_city = [0]*6
human_in_city[0] = N
moving_human = [0]*5

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













min_A = min(A)

count = 5 + math.ceil(N / min_A) -1

print(count)

Solution (Python):
import math
import heapq
import sys
from collections import Counter
import numpy as np
import datetime
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN





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

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

Solution (Python):

import sys
from math import ceil


def solve(N: int, A: int, B: int, C: int, D: int, E: int):
    print(ceil(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):
n = int(input())
t = [int(input()) for _ in range(5)]

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

Solution (Python):
import math

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

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

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
N = int(input())
abcde =[ int(input()) for _ in range(5)]
min_num = min(abcde)
if N%min_num == 0:
    print(5+math.ceil(N//min_num)-1)
else:
    print(5+math.ceil(N//min_num))

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(5-(-(n-m)//m))

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

Solution (Python):
import sys
from math import ceil

def main():
    n, *cap = map(int, sys.stdin.read().split())
    
    t = ceil(n / min(cap) + 4)
    print(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())

a = min(A, B, C, D, E)
ans = 5
if N % a != 0:
    ans += (N // a) 
else:
    ans += (N // a) - 1
if a >= N:
    ans = 5
print(ans)

Solution (Python):
import math
data=[int(input()) for i in range(6)]
n=data[0]
trans=data[1:]
mintrans=min(trans)

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

Solution (Python):


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

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


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

    arr = [A, B, C, D, E]
    minimum = min(arr)
    if N % minimum == 0:
        a = N // minimum
    else:
        a = N // minimum + 1

    print(a+4)


if __name__ == '__main__':
    main()

Solution (Python):

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

Solution (Python):
N = int(input())
C = []
for _ in range(5):
    C.append(int(input()))
minA = min(C)
if N - minA <= 0:
    print(5)
else:
    n = (N - minA) 
    if n % minA == 0:
        print(5 + (n // minA))
    else:
        print(6 + (n // minA))

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
INF=10**18
def input():
    return sys.stdin.readline().rstrip()

def main():
    N=int(input())
    l=[int(input()) for i in range(5)]
    l2=list(map(lambda x: -(-N//x)-1, l))
    print(5+sorted(l2)[4])

if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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


main()

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

Solution (Python):
import math
N=int(input())
T=[int(input()) for i in range(5)]
bottleneck=min(T)
if N<=bottleneck:
    Ans=5
else:
    Ans=5+math.ceil((N-bottleneck)/bottleneck)
print(Ans)

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

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

Solution (Python):

si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
min_num = 10**16
ans = 5
n = 0
for i in range(6):
    t = int(input())
    if i==0:
        n = t
    min_num = min(min_num,t)

if n==min_num:
    print(ans)
    exit()

a = n%min_num
if a == 0:
    ans += (n//min_num)-1
else:
    ans += (n//min_num)

print(ans)

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

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

group = -(-N // MIN)

print(5 + group - 1)

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

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

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

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

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

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

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

Solution (Python):
import math


def main():
    N = int(input())
    capacity = []

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

    m = min(capacity)
    print(math.ceil(N/m) + 4)


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
def k(a,b):
  if a%b!=0 or a<=b:
    return a//b+1
  else:
    return a//b

n=int(input())
a=[int(input()) for _ in range(5)]
print(4+k(n,min(a)))

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

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

Solution (Python):
import math

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

if a < N:
	ans = math.ceil(N/a) + 4
else:
	ans = 5

print(ans)

Solution (Python):
import math

N = int(input())
M=10**20
for i in range(5):
    M=min(M,int(input()))

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

Solution (Python):
import math

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

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

cnt = 5 + math.ceil(n / neck) - 1

print(cnt)

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

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

if n%p==0:
    q=n//p
else:
    q=n//p+1

print(5+q-1)

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

al = []

for _ in range(5):
    al.append(int(input()))


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

Solution (Python):
import math
a=[]
b=[]

for i in range(0,6):
  a.append(int(input()))

for j in range(1,6):
  b.append(math.ceil(a[0]/a[j]))
  
print(max(b)+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 = [0]*5
for i in range(5):
  trans[i]=int(input())

min_trans = min(trans)

t = math.ceil(n/min_trans) + 4

print(t)

Solution (Python):
import numpy as np

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

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

Solution (Python):
import math

def main():
    array = [int(input()) for _ in range(6)]
    n = array[0]
    array = array[1:]

    minimum = min(array)
    ans = math.ceil(n/minimum)+4
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
A = list(int(input()) for i in range(5))
preC = N
for a in A:
   preC = min(preC, a)
T = 4 + N // preC
if N % preC:
   T+=1
print(T)

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

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

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

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

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

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

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

if __name__ == '__main__':
    solve()

Solution (Python):

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

Solution (Python):
from sys import stdin
import math

n = int(stdin.readline().rstrip())
li = [int(stdin.readline().rstrip()) for _ in range(5)]
biri_kai = math.ceil(n/min(li))

total_time = biri_kai+4
print(total_time)

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

Solution (Python):





def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)
def lcm(a, b):
    return((a*b)//gcd(a,b))
def div(x):
    div=[1]
    check=2
    while(x!=1 and check <= int(x**0.5)+2):
        if(x%check==0):
            div.append(check)
            while(x%check==0):
                x=x//check
        check+=1
    if x != 1:
      div.append(x)
    return div
def div2(x):
    div2=[]
    check=2
    while(x!=1 and check <= int(x**0.5)+2):
        while x%check==0:
            div2.append(check)
            x/=check
        check+=1
    if x != 1:
      div2.append(x)
    return div2

def main():
    
    
    
    
    
    
    
    
    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)
    mm=n//m
    if n%m!=0:
        mm+=1
    print(mm+4)
main()

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

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

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

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



if __name__ == '__main__':
    main()

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

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

min_a = min(a)
min_i = a.index(min_a)

print(4 - (-n//min_a))

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

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

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

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

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

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

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

ans = 4 + -(-N//min(X))

print(int(ans))

Solution (Python):
N = int(input())
lst = [int(input()) for _ in range(5)]
m = min(lst)
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())

p = [a, b, c, d, e]
if n%min(p) != 0:
    print(n//min(p)+5)
else:
    print(n//min(p)+4)

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

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

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

Solution (Python):
import math

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

minuites = math.ceil(N / narrow) + 4
  
print(minuites)

Solution (Python):
import math

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

minuites = math.ceil(N / narrow) + 4
  
print(minuites)

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

min_ = min(move_num_list)
print(-(-N//min_)+4)

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

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

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

import math
ans=0
lista=[a,b,c,d,e]

if min(lista)>=n:
	ans=5
	
else:
	ans=math.ceil(n/min(lista))+4
	
print(ans)

Solution (Python):
def main():
    N, A, B, C, D, E = map(int, open(0).read().split())
    print(-(-N // min(A, B, C, D, E)) + 4)
    return


main()

Solution (Python):
def main():
    N, A, B, C, D, E = map(int, open(0).read().split())
    print(-(-N // min(A, B, C, D, E) - 4))
    return


main()

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

Solution (Python):
import heapq 
import math

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



min_trans  = min(transport)



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

Solution (Python):
import math

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

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

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

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

Solution (Python):
n = int(input())
a = []
for i in range(5):
    b = int(input())
    a.append(b)
x = min(a)
if n%x==0:
    print(n//x+4)
else:
    print(n//x+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):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

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

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

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) == 0:
    print(N//min(A, B, C, D, E)+4)
else:
    print(N//min(A, B, C, D, E)+5)

Solution (Python):
import numpy as np
N = int(input())
time = np.array([int(input()) for _ in range(5)])
place = np.zeros(6)
place[0] = N
end = 0
cnt = 0
'''
while place[5] != N:

    cnt += 1
    for i in range(4,-1,-1):
        now = place[i + 1]
        work = min(place[i] , time[i])
        place[i + 1] += work
        place[i] -= work
    
'''
ans = 0
min_val = min(time)
print(int(np.ceil(N / min_val) + 4))

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

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

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

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


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

Solution (Python):
N=int(input())
m=10**15+1
for _ in range(5):
    m=min(m,int(input()))
ans=(N+(m-1))//m+4
print(ans)

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

Solution (Python):
N=int(input()) 
rissoku=10**18
for _ in range(5): 
    rissoku=min(rissoku,int(input())) 

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

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

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

Solution (Python):
from math import ceil

ins = [int(input()) for _ in range(6)]
N, *xs = ins
k = min(xs)
print(4 + ceil(N/k))

Solution (Python):
from sys import stdin
import math

N = int(stdin.readline().rstrip())
X = [int(stdin.readline().rstrip()) for _ in range(5)]

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

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

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

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

print(counter)

Solution (Python):

N, A, B, C, D, E = list(map(int, open(0).read().split()))

print(-(-N//min(A,B,C,D,E)) + 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):
lst=[0]*6
for i in range(6):
  lst[i]=int(input())  
N=lst.pop(0)
m=min(lst)
if m<N:
  v1=N//m
  if N%m==0:
    print(5+v1-1)
  else:
    print(5+v1)
else:
  print(5)

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

Solution (Python):
import sys
import math
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n = ni()
a = []
for _ in range(5):
    a.append(ni())
print(math.ceil(n/min(a))+4)

Solution (Python):
import sys
import math

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

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

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

Solution (Python):
from math import ceil

c = []
n = int(input())
for _ in range(5):
    c.append(int(input()))
    
c.sort()
time = ceil(n/c[0]) + 4

print(time)

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

if n%neck==0:
    nt = n//neck -1
else:
    nt = n//neck
ans += nt
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):
from math import ceil
N = int(input())
print(4+max([ceil(N/int(input())) for _ in range(5)]))

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

Solution (Python):
import sys
from bisect import *
from collections import *
from copy import deepcopy
from datetime import *
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ main """
    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)

if __name__ == '__main__':
    main()

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

print(4 + btlneck)

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

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

min_move = min(move)

if n%min_move == 0:
    loss = -1
else:
    loss = 0

print(n//min_move + loss + 5)

Solution (Python):
import math

n = int(input())
a = [int(input()) for _ in range(5)]
t = 0
if n > min(a):
    t += math.ceil(n/min(a))
    t += 4
else:
    t += 5

print(t)

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

Solution (Python):
N,A,B,C,D,E = [int(input()) for _ in range(6)]
if N%min(A,B,C,D,E) == 0:
  bottle = N // min(A,B,C,D,E) - 1
else:
  bottle = N // min(A,B,C,D,E)
print(5+bottle)

Solution (Python):
def f_c():
    from math import ceil
    *i, = map(int, open(0).read().split())
    n, a = i[0], i[1:]
    print(len(a)-1+ceil(n/min(a)))

if __name__ == "__main__":
    f_c()

Solution (Python):

from math import ceil
count=0
n=int(input())
bus=[int(input()) for i in range(5)]








print(ceil(n/min(bus)+4))

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

idx=P.index(min(P))

ans=idx+(N-1+min(P))//min(P)+(4-idx)

print(ans)

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

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

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

Solution (Python):
import sys
from io import StringIO
import unittest
import math
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)
def resolve():
    N=int(input())
    a=[int(input()) for i in range(5)]
    m=min(a)
    print(4+math.ceil(N/m))
if __name__ == "__main__":
    resolve()

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

Solution (Python):
n = int(input())
num = float('inf')
for i in range(5):
    m = int(input())
    num = min(num, m)
print(-(-n // num) + 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
n = int(input())
a = list(int(input()) for _ in range(5))
print(math.ceil(n/min(a)) + 4)

Solution (Python):
import math

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

time = 0
mini = min(rides)
time = math.ceil(n/mini)+4

print(time)

Solution (Python):
import math

n = int(input())
info_list = [int(input()) for _ in range(5)]
min_num = min(info_list)
print(5+math.ceil(n/min_num)-1)

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

Solution (Python):
from decimal import Decimal
N = Decimal(input())
A = Decimal(input())
B = Decimal(input())
C = Decimal(input())
D = Decimal(input())
E = Decimal(input())
print((N-Decimal(0.1))//min(A,B,C,D,E)+5)

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

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

min_persons = min(persons)
print(4 - (-N // min_persons))

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

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

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

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

min_a = min(a)
min_i = a.index(min_a)

print(4 - (-n//min_a))

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