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 math
n = int(input())
abc = sorted([int(input()) for _ in range(5)])
print(4+math.ceil(n/abc[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())
print(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())
import math
x = math.ceil(N / (min(A, B, C, D, E)))
ans = 5 + (x - 1)
print(ans)

Solution (Python):
import math

L = []
for _ in range(6):
  L.append(int(input()))

print(4 + math.ceil(L[0]/min(L[1:])))

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

Solution (Python):
import sys
from math import ceil


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    n = int(input())
    T = [int(input()) for _ in range(5)]
    min_t = min(T)
    num = ceil(n / min_t)
    print(5 + num - 1)


if __name__ == '__main__':
    main()

Solution (Python):
import math

n = int(input())
t = [0] * 5
for i in range(5):
    t[i] = int(input())
print(math.ceil(n / min(t)) + 4)

Solution (Python):
from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf,comb
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
from functools import reduce
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()
a = []
for i in range(5):
    a.append(INT())

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

Solution (Python):
n  = int(input())
a_to_e =[0] * 5
lowest_ride = 10 ** 15 + 1
for i in range(5):
    a_to_e[i] = int(input())
    if a_to_e[i] < lowest_ride:
        lowest_ride = a_to_e[i]

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

Solution (Python):
import math
N=int(input())
l=[int(input())for i in range(5)]
if N<=min(l):
    print(5)
else:
    m=[0]*5
    for i in range(5):
        m[i]=math.ceil(N/l[i])
    print(5+max(m)-1)

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

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

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

m = 10**15+5
min_arg = 0
for i, j in enumerate([a,b,c,d,e], 1):
    if j < m:
        min_arg = i
        m = j

print(N//m + (N%m!=0) + 4)

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 collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

def readInt():
  return int(input())
def readInts():
  return list(map(int, input().split()))
def readChar():
  return input()
def readChars():
  return input().split()

n = readInt()
limit = [readInt() for i in range(5)]

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

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

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

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

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

Solution (Python):

n, *s = map(int, open(0).read().split())
print(-(-n // min(s)) + 4)

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

Solution (Python):
N=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(4+(N+F-1)//F)

Solution (Python):
N = int(input())
L = [int(input()) for _ in range(5)]
L.sort()
if N%L[0]:
  ans = N//L[0] + 1 + 4
else:
  ans = N//L[0] + 4
print(ans)

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

if N==1:
  print(5)
  exit()

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

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

ans = 0
m = N
for i, t in enumerate(T):
    if m > t:
        m = t
        ans = math.ceil(N/m) + i
    else:
        ans += 1
print(ans)

Solution (Python):
def waru(A,B):
  if A%B==0:
    return A//B
  else:
    return (A//B)+1
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])
print(waru(N,a)+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(int((n - 0.5) // m + 5))

Solution (Python):
n = int(input())
costs = [int(input()) for _ in range(5)]
nums = [0] * 6
mc = min(costs)
counts = -(-n//mc)
print(counts+4)

Solution (Python):

























































































def log(line):
    if False:
        print(line)


def calculation(lines):
    
    
    
    
    
    values = list()
    for i in range(6):
        values.append(int(lines[i]))
    
    
    

    N, A, B, C, D, E = values

    
    
    

    
    
    
    
    
    
    
    
    
    
    

    
    result = -(-N//min(values)) + 4

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['5', '3', '2', '4', '3', '5']
        lines_export = [7]
    if pattern == 2:
        lines_input = ['10', '123', '123', '123', '123', '123']
        lines_export = [5]
    if pattern == 3:
        lines_input = ['10000000007', '2', '3', '5', '7', '11']
        lines_export = [5000000008]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(6)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



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

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

print(((n - 1) // bn) + 5)

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

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

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

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

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())

N = I()
print(max((N-1)//I() for _ in range(5)) + 5)

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

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

Solution (Python):
N=int(input())
a=[None]*5
for i in range(5):
    a[i] =int(input())
def minarg(l):
    nl=len(l)
    mi=10**20
    idx=-1
    for i in range(nl):
        if l[i]<mi:
            mi=l[i]
            idx=i
    return (idx,mi)
import math
i_min,a_min = minarg(a)
print(math.ceil(N/a_min) + 4)

Solution (Python):
def main2():
    N=int(input())
    
    t=[int(input()) for _ in range(5)]
    MIN=min(t)
    if N%MIN==0:
        m=N//MIN+4
    else:
        m=N//MIN+1+4
    print(m)

if __name__=="__main__":
    main2()

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





mylist = [A,B,C,D,E]
x = min(mylist)
ans = -(-N//x)+4
print(ans)

Solution (Python):
import math

lst = []
for i in range(6):
    lst.append(int(input()))
min_ = min(lst[1:])
print(math.ceil(lst[0] / min_) + 4)

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

    hakobu = min(a, b, c, d, e)
    kaisuu = math.ceil( n / hakobu)

    print(kaisuu + 4)



if __name__ == "__main__":
    main()

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

Solution (Python):
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)

Solution (Python):
from math import *

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

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

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

bottle_neck=10**15+10

for i in range(5):
    if bottle_neck>x[i]:
        bottle_neck=x[i]

ans=ceil(n/bottle_neck)+4
print(ans)

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

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

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

Solution (Python):
import math

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

bottle = min(l)

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

Solution (Python):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import ceil
def main():
    n, a, b, c, d, e = map(int, readlines())
    mint = min(a, b, c, d, e)
    if n <= mint:
        r = 5
    else:
        r = 4 + ceil(n / mint)
    print(r)

if __name__ == '__main__':
    main()

Solution (Python):

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

Solution (Python):

import sys
from collections import deque, defaultdict
from math import sqrt, factorial, gcd





def solve():
    n = int(input())
    ans = 0
    m = float('inf')
    for i in range(5):
        x = int(input())
        m = min(m, x)
    xd = (n + m - 1) // m
    print(xd + 4)



    




        
    

    
    

t = 1

for case in range(1,t+1):
    ans = solve()


"""

2 2 2 2 2

"""

Solution (Python):
import math
n = int(input())
transportation = [int(input()) for i in range(5)]
bottleneck = min(transportation)
ans = 0
if bottleneck >= n:
	ans = 5
else:
	ans = math.ceil((n-bottleneck)/bottleneck)+5
print(ans)

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

Solution (Python):
import sys
import math


def input():
    return sys.stdin.readline().rstrip()


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

    time =0

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







if __name__ == "__main__":
    main()

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

M = min(W)
print(int(numpy.ceil(N / M) + 4))

Solution (Python):


def main():
    N = int(input())
    City = [int(input()) for i in range(5)]
    cnt = (N-1)//min(City)+5
    print(cnt)


if __name__ == "__main__":
    main()

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

def main():
    n = int(input())
    people = [int(input()) for _ in range(5)]
    print(math.ceil(n/min(people))+4)
            
if __name__ == '__main__':
    main()

Solution (Python):
import math
num = int(input())
min_power = 100000000000000000000000

for i in range(5):
  tmp = int(input())
  if min_power > tmp:
    min_power = tmp

x = math.ceil(num/min_power) + 4
print(x)

Solution (Python):
import math

def main():
    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 = math.ceil(N/a) + 4
    print(ans)

if __name__ == '__main__':
    main()

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

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

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

cmax = (n + min(cnt) - 1) // min(cnt)
print(cmax - 1 + 5)

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

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

Solution (Python):
import math
N = int(input())
Cap = [int(input()) for X in range(0,5)]
print(int(math.ceil(N/min(Cap))+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, min(b, min(c, min(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)
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())

m = [a, b, c, d, e]
max_t = -1
for i in range(5):
  t = math.ceil(n / m[i])
  max_t = max(max_t, t)

print(max_t+4)

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n, *a = [ri() for _ in range(6)]
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())

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

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

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

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

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy,deepcopy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(map(int,input().split()))
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

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

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

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

Solution (Python):
def resolve():
  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 - 1) // x + 4
  print(ans)

  return

if __name__ == "__main__":
  resolve()

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

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

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))+5-1)

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

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

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)

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

import math

neck = min(a2e)

ans = 5

t_neck = math.ceil(n/neck)

ans += t_neck-1

print(ans)

Solution (Python):
import sys
import math
def I(): return int(sys.stdin.readline().rstrip())

def Main():
    n,a,b,c,d,e = I(),I(),I(),I(),I(),I()
    mini = min(a,b,c,d,e)
    tn = math.ceil(n/mini)
    print(tn+4)
    return

if __name__=='__main__':
    Main()

Solution (Python):

def solve():
    ABCDEmin = min(ABCDE)

    if N % ABCDEmin == 0:
        t = N//ABCDEmin + 4
    else:
        t = N//ABCDEmin + 4 + 1
    print(t)

        

if __name__ == "__main__":
    N = int(input())
    ABCDE = [int(input()) for _ in range(5)]
    solve()

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

N = k()
A = k()
B = k()
C = k()
D = k()
E = k()

if A >= N and B >=N and C>=N and D>=N and E >=N:
    print(5)
    sys.exit()

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

Solution (Python):
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    n = I()
    trans = [I(), I(), I(), I(), I()]
    ans = 0
    if n%min(trans) == 0:
        ans = n//min(trans) + 4
    else:
        ans = n//min(trans) + 5
    print(ans)

if __name__ == '__main__':
    main()

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

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

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

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



'''
if min(lst) >= N:
    print(5)
else:
    print(N//min(lst)+5)
'''

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

Solution (Python):
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
print(4-(-N//min(A,B,C,D,E)))

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)

k = (N + m - 1) // m
print(k + 4)

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

Solution (Python):
n,a,b,c,d,e = map(int,open(0).read().split())
m = min(a,b,c,d,e)
ans = n//m+4
if n%m == 0:
  print(ans)
else:
  print(ans+1)

Solution (Python):
from math import ceil
N, *A= [int(input()) for _ in range(6)]
print(ceil(N/min(A))+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):
n = int(input())
minn = 10**16
for i in range(5):
    minn = min(minn, int(input()))
print((n-1) // minn + 5)

Solution (Python):

import sys
import math
input = sys.stdin.readline
N = int(input())
a_max =[] 
num =[0]*5 
for i in range(5):
    x = int(input())
    a_max.append(x)
    num[i] =math.ceil(N /x)


max_value = max(num)
max_index = num.index(max_value)
ans =num[max_index] +6-2
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,e,d)
if n%t==0:
    print(n//t+4)
else:
    print(n//t+5)

Solution (Python):
import numpy as np

N = int(input())
time_array = np.array([int(input()) for _ in range(5)])
N_array = np.ones(5, dtype=np.int)*N

count_array = np.ceil(N_array / time_array)
answer = int(count_array.max() + 4)

print(answer)

Solution (Python):
from math import ceil
n = int(input())
st = set()
for i in range(5):
  st.add(int(input()))
print(ceil(n / min(st)) + 4)

Solution (Python):
import math


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

f = min(a, b, c, d, e)
ans = (math.ceil(n / f) - 1) + 5
print(ans)

Solution (Python):

from math import ceil
n, a, b, c, d, e = map(int, open(0).read().split())
s = min(a, b, c, d, e)
print(4 + ceil(n/s))

Solution (Python):
import math

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

for l in li:
  if l < div:
    div = l
    
print(math.ceil(n/div)+4)

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

Solution (Python):
import math

def main2():
    n=int(input())
    l = []
    for i in range(5):
        s = int(input())
        l.append(s)
    print(math.ceil((n)/min(l))+4)
if __name__ == '__main__':
    main2()

Solution (Python):
import math

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    P = [int(input()) for i in range(5)]
    NEC = min(P)
    ans = (N+NEC-1)//NEC + 4
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
import math

N = int(input())
A = [int(input())for i in range(0,5,1)]

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

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

import math

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

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 = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())


MIN = min([a, b, c, d, e])
if n % MIN == 0:
    ans = 5 + n // MIN - 1
else:
    ans = 5 + n // MIN
print(ans)

Solution (Python):
n= int(input())
b=10**15+1
for i in range(5):
    b=min(b,int(input()))
    
if n%b==0:
    print(4+n//b)
else:
    print(5+n//b)

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

Solution (Python):
n,*L = map(int,open(0).read().split())
min1 = min(L)
ri = 0
if n <= min1:
    print(5)
    exit()
if n%min1 == 0:
    ri = n//min1
else:
    ri = n//min1 +1
        
print(ri +4)

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

Solution (Python):
n=int(input())
m=10**15+1
mi=0
for i in range(5):
  a=int(input())
  if a<m:
    m=a
    mi=i
print((n-1)//m+1+5-1)

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

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


max_ = -1
min_flow = float('inf')
for i in range(5):
    x = int(input())
    min_flow = min(min_flow, x)

    q, r = divmod(N, min_flow)

    if r != 0:
        q += 1

    max_ = max(max_, i + q)


print(max_)

Solution (Python):
I = [int(input()) for _ in range(6)]

N = I[0]
M = min(I[1:])

T = -(-N // M) + 4

print(T)

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

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 sys

N = int(sys.stdin.readline())
A = int(sys.stdin.readline())
B = int(sys.stdin.readline())
C = int(sys.stdin.readline())
D = int(sys.stdin.readline())
E = int(sys.stdin.readline())

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

Solution (Python):
import math

N = int(input())
C = [int(input()) for i in range(5)]

M = 4
W = math.ceil(N/min(C))

print(M+W)

Solution (Python):
n = int(input())
m = float("inf")

for i in range(5):
    m = min(m,int(input()))
    
print(-(-n//m) + 4)

Solution (Python):
import collections
n = int(raw_input())
ais = map(int,[raw_input() for _ in range(5)])
m = min(ais)
print (n + m -1) / m  + 4

Solution (Python):


import math
N = int(input())
Carry = []
for i in range(5):
    Carry.append(int(input()))
min_num = min(Carry)

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

Solution (Python):
N = int(input())
Carry = []
for i in range(5):
    Carry.append(int(input()))
min_num = min(Carry)
if N < min_num:
    print(5)
elif min_num == 1:
    print((N//min_num)+4)
elif N % min_num == 0:
    print((N//min_num))
else:
    print((N//min_num)+5)

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

Solution (Python):
import numpy as np


def main():
    n = int(input())
    abcde = [int(input()) for _ in range(5)]
    min_abcde = min(abcde)
    ans = int(np.ceil(n/min_abcde) + 4)
    print(ans)


if __name__ == "__main__":
    main()

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

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

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

q, r = divmod(n, min(t))

if r > 0:
    q += 1
    
print(q+4)

Solution (Python):
import math
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n, *l = map(int, read().split())

cost = math.ceil(n / min(l))
cost += 4

print(cost)

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

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

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

Solution (Python):
n,*m = map(int,open(0))

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

Solution (Python):
import math

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

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

Solution (Python):
n = int(input())
buses = [int(input())for i in range(5)]
buses.sort()
capa = n//buses[0] if n/buses[0] != n//buses[0] else n//buses[0]-1
print(5+capa)

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readline_s = sys.stdin.readline
readlines = sys.stdin.buffer.readlines


def main():

    N = int(readline())
    num = []
    for i in range(5):
        num.append(int(readline()))

    q, r = divmod(N, min(num))
    ans = q + 4
    ans += 1 if r else 0
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readline_s = sys.stdin.readline
readlines = sys.stdin.buffer.readlines


def main():

    N = int(readline())
    num = []
    for i in range(5):
        num.append(int(readline()))

    q, r = divmod(N, min(num))
    ans = q + (not (not r)) + 4
    print(ans)


if __name__ == '__main__':
    main()