Problem:
 Score: 300 points    Problem Statement  In 2028 and after a continuous growth, AtCoder Inc. finally built an empire with six cities (City 1, 2, 3, 4, 5, 6 )!  There are five means of transport in this empire:   Train: travels from City 1 to 2 in one minute. A train can occupy at most A people.  Bus: travels from City 2 to 3 in one minute. A bus can occupy at most B people.  Taxi: travels from City 3 to 4 in one minute. A taxi can occupy at most C people.  Airplane: travels from City 4 to 5 in one minute. An airplane can occupy at most D people.  Ship: travels from City 5 to 6 in one minute. A ship can occupy at most E people.   For each of them, one vehicle leaves the city at each integer time (time 0 , 1 , 2 , ... ).  There is a group of N people at City 1 , and they all want to go to City 6 . At least how long does it take for all of them to reach there? 
You can ignore the time needed to transfer.      Constraints   1 \leq N, A, B, C, D, E \leq 10^{15}  All values in input are integers.         Input  Input is given from Standard Input in the following format:  N  A  B  C  D  E       Output  Print the minimum time required for all of the people to reach City 6 , in minutes.        Sample Input 1 5
3
2
4
3
5      Sample Output 1 7  One possible way to travel is as follows.
First, there are N = 5 people at City 1 , as shown in the following image:   In the first minute, three people travels from City 1 to City 2 by train. Note that a train can only occupy at most three people.   In the second minute, the remaining two people travels from City 1 to City 2 by train, and two of the three people who were already at City 2 travels to City 3 by bus. Note that a bus can only occupy at most two people.   In the third minute, two people travels from City 2 to City 3 by train, and another two people travels from City 3 to City 4 by taxi.   From then on, if they continue traveling without stopping until they reach City 6 , all of them can reach there in seven minutes. There is no way for them to reach City 6 in 6 minutes or less.       Sample Input 2 10
123
123
123
123
123      Sample Output 2 5  All kinds of vehicles can occupy N = 10 people at a time.
Thus, if they continue traveling without stopping until they reach City 6 , all of them can reach there in five minutes.       Sample Input 3 10000000007
2
3
5
7
11      Sample Output 3 5000000008  Note that the input or output may not fit into a 32 -bit integer type.

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    a = int(input().rstrip('\n'))
    b = int(input().rstrip('\n'))
    c = int(input().rstrip('\n'))
    d = int(input().rstrip('\n'))
    e = int(input().rstrip('\n'))

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

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


if __name__ == '__main__':
    slove()

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

Solution (Python):
import math
n = int(input())
ma = 10**16
ind = 0
for i in range(5):
    ai = int(input())
    if ma >= ai:
        ind = i
        ma = ai
print(math.ceil(n/ma)+4)

Solution (Python):
N = int(input())
L = [0 for i in range(5)]
for i in range(5):
    L[i] = int(input())
    
time = [0 for i in range(5)]
time[0] = (N-1)//L[0] + 1
for i in range(4):
    if L[i] <= L[i+1]:
        time[i+1] = time[i]
    else:
        time[i+1] = (N-1)//L[i+1] + 1
        
ans = max(time) + 4
        
print(ans)

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

x=min(A, B, C, D, E)
y=N//x
z=N%x
if z>0:
  y+=1
  
print(y+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))
print(((N - m) + (m - 1)) // m + 5)

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

Solution (Python):
import math

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

print(math.ceil(num / min(accomodate_num)) + 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:
    print(N//m+5)
else:
    print(N//m+4)

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

Solution (Python):

N=int(input())
a=int(input())
for i in range(4):
    a=min(a,int(input()))
    
ans=4
if N%a>0:
    ans+=N//a+1
else:
    ans+=N//a
print(ans)

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

Solution (Python):






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

ans = N//min_num
if N % min_num > 0:
    ans += 1
ans += 4

print(ans)

Solution (Python):
import math
N=int(input())
A,B,C,D,E=[int(input()) for _ in range(5)]
m=math.ceil(N/A)
if A<=B:
  B=A
  m+=1
else:
  m+=math.ceil((N-B*(m-1))/B)
if B<=C:
  C=B
  m+=1
else:
  m+=math.ceil((N-C*(m-2))/C)
if C<=D:
  D=C
  m+=1
else:
  m+=math.ceil((N-D*(m-3))/D)
if D<=E:
  m+=1
else:
  m+=math.ceil((N-E*(m-4))/E)
print(m)

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


N = int(input())
slowest = float('inf')
for i in range(5):
    a = int(input())
    slowest = min(slowest, a)

remain = N-slowest
diff = -(-remain // slowest)
print(5 + diff)

Solution (Python):
from math import ceil

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(4+ceil(n/mi))

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

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


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

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

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

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

print((N+(m-N%m)%m)//m+4)

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

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

Solution (Python):
import math
n = int(input())
l = list(int(input()) for _ in range(5))

if n <= min(l):
  print(5)
else:
  print(5 + math.ceil(n / min(l)) - 1)

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

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

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

Solution (Python):
import math 

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

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

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

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

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

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations
import sys
import string
from bisect import bisect_left
from math import factorial


INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LIM(): return list(map(lambda x:int(x) - 1, sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def LIRM(n): return [LIM() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
mod = 1000000007


n = I()
L = IR(5)
print(5 + (n - 1) // min(L))

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

Solution (Python):
import math

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

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

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

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

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

Solution (Python):
import math
n, a, b, c, d, e = [int(input()) for i in range(6)]
m = min(a, b, c, d, e)

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

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

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

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

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

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

Solution (Python):
if __name__ == '__main__':
    N = int(input())
    P = [int(input()) for _ in range(5)]
    
    min_P = min(P)
    
    count = 0
    count += 4
    count += N//min_P
    if N//min_P < N/min_P:
        count += 1
    
    print(count)

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

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

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


minLimit = min(pasLimit)
groupNum = n//minLimit
if n%minLimit != 0:
  groupNum += 1
print(5 + (groupNum-1))

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

Solution (Python):
n = int(input())
for i in range(5):
    if i == 0:
        min_a = int(input())
    else:
        a = int(input())
        min_a = min(min_a,a)
print((n//min_a)+4 if n%min_a==0 else (n//min_a)+5)

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

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

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

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

Solution (Python):
from math import ceil


n = int(input())
a = [int(input()) for i in range(5)]
if min(a) >= n:
    print(5)
    exit()
print(ceil(n / min(a)) + 5 - 1)

Solution (Python):
import math

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

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)
if n%mi != 0:
    print((n//mi)+1+4)
else:
    print((n//mi)+4)

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    ls = [int(input().rstrip('\n')) for _ in range(5)]
    m_t = min(ls)
    print((n + m_t - 1) // m_t + 4)


if __name__ == '__main__':
    slove()

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

ans = ceil(N/min(A)) + 4

print(ans)

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

move = min(ride)

import math

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

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

Solution (Python):
N = int(input())
T = list(map(int, [input() for _ in range(5)]))
t = min(T)
print(N // t + bool(N % t) + 4)

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

a = min(f)
result = 0
result += n//a
if n%a != 0:
    result += 1

print(result+4)

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

    ans = 4 + (N // min(A) + (1 if N % min(A) > 0 else 0))
    print(ans)

main()

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())
C = [int(input()) for i in range(5)]
print(4-(-n)//min(C))

Solution (Python):
from math import ceil
N = int(input())
lst = []
min = 10**15
for i in range(5):
    x = int(input())
    lst.append(x)
    if min > x:
        min = x
        loc = i

time = 4 + ceil(N/min) 
print(time)

Solution (Python):
from math import ceil
n, a, b, c, d, e = (int(input()) for i in range(6))
move01 = int(ceil(n/a))
move12 = 1 + int(ceil(n/min(a,b)))
move23 = max(2 + int(ceil(n/c)), 1 + move12)
move34 = max(3 + int(ceil(n/d)), 1 + move23)
move45 = max(4 + int(ceil(n/e)), 1 + move34)
print(move45)

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 = int(input());B = int(input());C = int(input());D = int(input());E = int(input())

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

ans = 5+(N//min_cap)

if N%min_cap == 0:
    ans -= 1
print(ans)

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

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

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
















        



    


time = -(-n//min(A))
print(time + 4)

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

print (int(ceil(N / min(T))) + len(T) - 1)

Solution (Python):
import math

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

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

print(ans)

Solution (Python):
from math import ceil

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

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

Solution (Python):
n,*city = [int(input()) for _ in range(6)]
print(4-(-n//min(city)))

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

Solution (Python):



import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

Solution (Python):
import math

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

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

Solution (Python):
N=input()
A=input()
B=input()
C=input()
D=input()
E=input()
N=int(N)
A=int(A)
B=int(B)
C=int(C)
D=int(D)
E=int(E)
a=N//A
b=N//B
c=N//C
d=N//D
e=N//E
f=max(a,b,c,d,e)
g=min(A,B,C,D,E)
if N%g==0:
    print(f+4)
else:
    print(f+5)

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

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

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

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

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

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

Solution (Python):
import math

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

Solution (Python):
import math
import copy
import fractions
import numpy as np
from functools import reduce



def getInputNum():
    inputNum = int(input())
    return inputNum

def getInputListInt():
    outputoData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData

def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList

def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList



n, = map(int, input().split())
metroNum = 6
transLim = getSomeInputInt(metroNum-1)

neck = min(transLim)

tmpans = math.ceil(n/neck)
ans = tmpans + metroNum - 2

print(ans)

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

Solution (Python):
from math import ceil

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

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

ans = ceil(N / min_move) + 4

print(ans)

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

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

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

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

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

dp = [0] * 6
dp[0] = N
T = [A,B,C,D,E]
ans = 0

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







print(ans)

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

Solution (Python):
import math

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



def sim(n, xs):
    state = [n] + [0] * 5
    step = 0
    while state[5] < n:
        moves = [min(state[i], xs[i]) for i in range(5)]
        for i in range(5):
            state[i] -= moves[i]
            state[i + 1] += moves[i]
        step += 1

    return step


def solve(n, xs):
    return math.ceil(n / min(xs)) + 4


print(solve(n, xs))

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

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

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

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

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


def main(): 

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



if __name__ == "__main__":
    main()

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)

n2 = int(math.ceil(n / m))
time = 5 + (n2-1)
print(time)

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

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

Solution (Python):
import math

N = int(input())

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

_min = min(abc)

count = math.ceil(N/_min)


print(5+(count-1))

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

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

answer = 5 + math.ceil(N/s) - 1

print(answer)

Solution (Python):
from math import ceil

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

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

Solution (Python):
import math


def resolve():
    n = int(input())
    abcde = list(int(input()) for _ in range(5))
    print(math.ceil(n / min(abcde)) + 4)


if __name__ == "__main__":
    resolve()

Solution (Python):
import math
def main():
    N = int(input())
    min_f = float('inf')
    for i in range(5):
        f = int(input())
        min_f = min(min_f, f)

    return 4 + math.ceil(N/min_f)

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

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

Solution (Python):

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

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

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

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

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

Solution (Python):

import sys
import math
from collections import defaultdict


sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]


mod = 10**9 + 7


def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return map(list,zip(*read_all))



N = I()
x = [0]*5
for i in range(5):
    x[i] = I()

move = min(x)

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

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

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

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

Solution (Python):

import math
n = int(input())
A = [int(input()) for i in range(5)]

x = min(A)
print(math.ceil(n/x) + 4)

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

print(k+4)

Solution (Python):
import math
n = int(input())
s = []
for i in range(5):
  s.append(int(input()))
s_min = min(s)
min_idx = s.index(s_min)

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

Solution (Python):
N = int(input())
min_ = min(int(input()) for _ in range(5))

print((N - 1) // min_ + 5)

Solution (Python):
import math

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

print(ans)

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

ans = 0
if n % min(trans) == 0:
    ans = n//min(trans)+4
else:
    ans = n//min(trans)+5

print(ans)

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

if N%Amin ==0:
  ans = N//Amin-1+5
else:
  ans = N//Amin+5

print(ans)

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

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

Solution (Python):
import math,fractions
from collections import Counter
n,a,b,c,d,e = [int(input()) for i in range(6)]
print((n-1)//min(a,b,c,d,e)+5)

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)
if N % tmp == 0:
    ans = N // tmp
else:
    ans =  N // tmp + 1

print(ans+4)

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

time = [A,B,C,D,E]
if N%min(time)==0:
	print(5+N//min(time)-1)
else:
	if N>min(time):
		print(5+N//min(time))
	else:
		print(5)

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

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

Solution (Python):
import math

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

print(m-1+5)

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

n = int(input())

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

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

Solution (Python):
a=[int(input()) for i in [0]*6]
mini=min(a[1:])
print(-(-a[0]//mini)+4)

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

Solution (Python):
from math import ceil,floor

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)

Solution (Python):
import math

N = int(input())
minNum = int(input())
for i in range(1, 5):
    inputNum = int(input())
    if minNum > inputNum:
        minNum = inputNum
print(math.ceil(N/minNum) + 4)

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

transport_capacities = [
    [1, a]
    ,[2, b]
    ,[3, c]
    ,[4, d]
    ,[5, e]
    ]



man_in_cties = [0, n, 0, 0, 0, 0, 0]


transport_capacities.sort(key=lambda x: x[1])
min_capa_id, capa = transport_capacities.pop(0)

total_time = (min_capa_id-1)

if n % capa > 0:
    total_time += n//capa + 1
else:
    total_time += n//capa

total_time += 5 - min_capa_id

print(total_time)

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

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

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

minimum = min(l)
if n % minimum == 0:
    ans = n / minimum + 4
else:
    ans = (n // minimum) + 5

print(int(ans))

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

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

min_transporter = min([A, B, C, D, E])
if min_transporter >= N:
  print(5)
else:
  print((N + min_transporter - 1) // min_transporter + 4)

Solution (Python):
n = int(input())
transportation = list(int(input()) for _ in range(5))

print(int(-(-n//min(transportation)) + 4))

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

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

Solution (Python):
import itertools

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

n = getint()
a = min([getint() for _ in range(5)])
m = (n + a - 1) // a
print(m + 4)

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

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

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())
caps = []

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

minV = min(caps)

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

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

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())
li = [int(input()) for _ in range(5)]

ans = 4 + n // min(li)
if n % min(li) != 0:
    ans += 1
print(ans)

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

l=[a,b,c,d,e]
l.sort()

if n%l[0]!=0:
        print(5+n//l[0])
else:
        print(4+n//l[0])

Solution (Python):


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

ans=5+n//a-1 if n%a==0 else 5+n//a
print(ans)

Solution (Python):


import copy
import math

n = int(input().split()[0]) 
a = int(input().split()[0]) 
b = int(input().split()[0]) 
c = int(input().split()[0]) 
d = int(input().split()[0]) 
e = int(input().split()[0]) 



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



ans = math.ceil(float(n) / min_cap) + 4

print(ans)

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

Solution (Python):
from math import ceil

N,a,b,c,d,e = [int(input()) for x in range(6)]
print(int(ceil(N / min(a,b,c,d,e)) + 4))

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

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

min_cap = min(cap)

time = 4 + n//min_cap
if n%min_cap != 0:
	time += 1
print(time)

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):
import sys
from collections import deque, defaultdict
import copy
import bisect


import math
import heapq
 

 
N = int(input())
 
x = []
for i in range(5):
	x.append(int(input()))
 
bottle = min(x)
times = math.ceil(N/bottle)
print(times + 4)

Solution (Python):
import math
import heapq
 

 
N = int(input())
 
x = []
for i in range(5):
	x.append(int(input()))
 
bottle = min(x)
times = math.ceil(N/bottle)
print(times + 4)

Solution (Python):
import math
import heapq


N = int(input())

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

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

Solution (Python):
def five_transportations(n,a):
    min_a = min(a)
    rem = n
    count = 0
    mod = -(-rem//min_a)
    mod += 5 - 1
    return mod
if __name__ == '__main__':
    n = int(raw_input())
    a = [int(raw_input()) for i in range(5)]

    print five_transportations(n,a)

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

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

g = N // p + (1 if N % p > 0 else 0)

print(5 + g - 1)

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

min_trans = min(trans)
print(math.ceil(n/min_trans) + 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)
ans = 4 + math.ceil(N/X)

print(ans)