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

Solution (Python):
import math

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

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

Solution (Python):
import math


def main():
    n = int(input())
    
    
    
    

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


if __name__ == '__main__':
    main()

Solution (Python):
import math
N = int(input())
p = [0] * 5
bn = float('inf')
for i in range(5):
  p[i] = int(input())
  if bn > p[i]:
    bn = p[i]
ans = 0
print(math.ceil(N / bn) + (5 - 1))

Solution (Python):
n=int(input())
t=[int(input()) for i in range(5)]
k=0
for i in range(5):
    k=max(k,(n+t[i]-1)//t[i])
print(k+4)

Solution (Python):
N = int(input())
T = []
for i in range(5):
    T.append(int(input()))
k = 0
for i in range(5):
    if N % T[i] == 0:
        k = max(k, N//T[i])
    else:
        k = max(k, N//T[i] + 1)
print(4 + k)

Solution (Python):
from math import *

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

ans = ceil(n / a[0])
min = 0
for i in range(1, 5):
  if a[i] >= a[min]:
    ans += 1
  else:
    ans = ceil(n / a[i]) + i
    min = i

print(ans)

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

if min(l) >= n:
    print(5)
else:
    print((n-1)//min(l) + 5)

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

print(4-(-n//min(abcde)))

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

print(int((n + bn - 1) / bn) + 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):
import math


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

    l = [n, 0, 0, 0, 0, 0]
    time = 0

    move_a = a
    move_b = min(move_a, b)
    move_c = min(move_b, c)
    move_d = min(move_c, d)
    move_e = min(move_d, e)

    time = math.ceil(n / move_e) + 4

    print(time)


'''
    while True:
        move_a = min(a, l[0])
        move_b = min(b, l[1])
        move_c = min(c, l[2])
        move_d = min(c, l[3])
        move_e = min(c, l[4])

        l[0] -= move_a
        l[1] += move_a
        l[1] -= move_b
        l[2] += move_b
        l[2] -= move_c
        l[3] += move_c
        l[3] -= move_d
        l[4] += move_d
        l[4] -= move_e
        l[5] += move_e

        time += 1
        if l[5] >= n:
            break

    print(time)
'''

'''
    0: [n-a, a, 0, 0, 0, 0]
    1: [n-2a,2a-b, b, 0, 0, 0]
    2: [n-3a,3a-2b, 2b-c, c, 0, 0]
    3: [n-4a, 4a-3b, 3b-2c, 2c-d, d, 0]
    4: [n-5a, 5a-4b, 4b-3c, 3c-2d, 2d-e, e]
    5: [n-6a, 6a-5b, 5b-4c, 4c-3d, 3d-2e, 2e]
    6: [n-7a, 7a-5b, 6b-5c, 5c-4d, 4d-3e, 3e]

    v1: 全員が0->1に移動する: math.ceil(n/a)
    v2: 全員が1->2に移動する: math.ceil(n/min(v1, b))
    v3: 2->3: math.ceil

'''


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    N = int(input())
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())
    E = int(input())
    min_v = min([A, B, C, D, E])
    if N % min_v != 0:
        print(4 + N // min_v + 1)
    else:
        print(4 + N // min_v)


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())
print(math.ceil(N/min(A,B,C,D,E)) + 4)

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

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

Solution (Python):
import math
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
bottle = min([A, B, C, D, E])
if bottle < N:
  print(math.ceil(N/bottle)+4)
else:
  print(5)

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

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

ans = -(-n//minimum)

print(ans+4)

Solution (Python):

"""
Created on Sat Sep 12 23:38:36 2020

@author: liang
"""

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

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

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

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

transportations = [A, B, C, D, E]
minCap = min(transportations)
minIdx = transportations.index(minCap)
transportations.pop(minIdx)

time = N // minCap
if N % minCap != 0:
	time += 1
	
time += 4

print(time)

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

m=min(D)
g=-(-(N-m)//m)

print(5+g)

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

Solution (Python):

N = int(input())
lis = [int(input()) for _ in range(5)]
mini = min(lis)
group = (N+mini-1)//mini

ans = 5 + group - 1
print(ans)

Solution (Python):
n = int(input())
tp = []
tmp = 10**15
for _ in range(5):
    a = int(input())
    if tmp > a:
        tmp = a
    tp.append(a)

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

cnt = n//tmp
mod = n%tmp

if mod > 0:
    print(5+cnt)
else:
    print(5+cnt-1)

Solution (Python):

import sys
import math
import decimal
import itertools
from itertools import product
from functools import reduce
def input():
    return sys.stdin.readline()[:-1]
def sort_zip(a:list, b:list):
    z = zip(a, b)
    z = sorted(z)
    a, b = zip(*z)
    a = list(a)
    b = list(b)
    return a, b

def main():
    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 = 5
    ans += N // x
    if N % x == 0:
        ans -= 1
    print(ans)

if __name__ == '__main__':
    main()

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

Solution (Python):
from math import ceil


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

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

Solution (Python):
import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right 
from heapq import heapify, heappop, heappush
from itertools import product, permutations, combinations, combinations_with_replacement
from math import *

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def lcm(x,y):
    return x*y//gcd(x,y)
def lgcd(l):
    return reduce(gcd,l)
def llcm(l):
    return reduce(lcm,l)
def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def ilint():
    return int(input()), list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)
def ston(c, c0='a'):
    return ord(c)-ord(c0)
def ntos(x, c0='a'):
    return chr(x+ord(c0))
class counter(dict):
    def __init__(self, *args):
        super().__init__(args)
    def add(self,x):
        self.setdefault(x,0)
        self[x] += 1

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

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

Solution (Python):
from math import *

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

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

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

Solution (Python):
import math

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

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

Solution (Python):








def solve(N, A, B, C, D, E):
    tmp = min(A, B, C, D, E)
    tmp, tmp2 = divmod(N, tmp)
    tmp += 0 if tmp2 == 0 else 1
    print(tmp + 4)


if __name__ == '__main__':
    N = int(input())
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())
    E = int(input())
    solve(N, 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())
from math import ceil
a = ceil(N/A)
F = [A,B,C,D,E]
for i in range(1,5):
    if F[i-1] <= F[i]:
        a += 1
    else:
        b = ceil(N/F[i])
        a = max(a+1,b+i)
print(a)

Solution (Python):
def main():
    n = int(input())
    data = [int(input()) for i in range(5)]
    quo, rem = divmod(n, min(data))
    print(4 + quo + bool(rem))


main()

Solution (Python):
def main():
    n = int(input())
    data = [int(input()) for i in range(5)]
    quo, rem = divmod(n, min(data))
    quo = 5 + quo
    if rem:
        print(quo)
    else:
        print(quo - 1)

main()

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

print((N + min(T) - 1) // min(T) + 4)

Solution (Python):
'''
Created on 2020/08/30

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  N=int(pin())
  A=int(pin())
  B=int(pin())
  C=int(pin())
  D=int(pin())
  E=int(pin())
  
  t=min(A,B,C,D,E)
  if N%t==0:
    print(N//t+4)
  else:
    print(N//t+5)
  return 
main()

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(5)]
minimum = min(a)
print((n + minimum - 1) // minimum + 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())
A = []
for i in range(5):
  A.append(int(input()))
m = min(A)
print(4 + (N + m - 1) // m)

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

from math import ceil
t = min(T)
print(ceil(N/t) + 4)

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

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

Solution (Python):
import math

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

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

Solution (Python):

import sys



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


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    n = input_int()
    a = input_int()
    b = input_int()
    c = input_int()
    d = input_int()
    e = input_int()
    _min = min(a, b, c, d, e)
    ans = (n // _min) - 1 + 5
    if n % _min > 0:
        ans += 1
    print(ans)

    return


if __name__ == "__main__":
    main()

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

res = math.ceil(N/min(mobile)) + 4

print(res)

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

if N%min(li)==0:
    a=N//min(li)-1
else:
    a=N//min(li)
ans=5+a

print(ans)

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

minA = min(A)

import math
print(4+math.ceil(n/minA))

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

a, b = divmod(n, x)
if b == 0:
    print(5+(a-1))
else:
    print(5+a)

Solution (Python):
n, a, b, c, d, e = [int(input()) for _ in range(6)]
minVal = min(a, b, c, d, e)
if n // minVal == n / minVal:
    ans = n // minVal + 4
else:
    ans = (n // minVal + 1) + 4
print(ans)

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

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

Solution (Python):
import math


def main():
    n = int(input())
    csr = []
    for _ in range(5):
        csr.append(int(input()))
    
    print(4+math.ceil(n/min(csr)))


if __name__ == "__main__":
    main()

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:
  t = n//m +5
else:
  t = n//m +4
print(t)

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

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

Solution (Python):
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    n = I()
    semai = float("inf")
    for _ in range(5):
        minute = I()
        semai = min(semai,minute)
    
    group = (n+semai-1)//semai
    ans = group + 4
    print(ans)
main()

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

x = float('inf')
for _ in range(5):
    a = int(input())
    x = min(x,a)

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

Solution (Python):

from collections import defaultdict, deque, Counter, OrderedDict
from bisect import bisect_left, bisect_right
from functools import reduce, lru_cache
from heapq import heappush, heappop, heapify

import itertools
import math, fractions
import sys, copy

def L(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline().rstrip())
def SL(): return list(sys.stdin.readline().rstrip())
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return [list(x) for x in sys.stdin.readline().split()]
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def LIR1(n): return [LI1() for _ in range(n)]
def SR(n): return [SL() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
def LR(n): return [L() for _ in range(n)]

def perm(n, r): return math.factorial(n) // math.factorial(r)
def comb(n, r): return math.factorial(n) // (math.factorial(r) * math.factorial(n-r))

def make_list(n, *args, default=0): return [make_list(*args, default=default) for _ in range(n)] if len(args) > 0 else [default for _ in range(n)]

sys.setrecursionlimit(1000000)
dire, dire8 = [[1, 0], [0, 1], [-1, 0], [0, -1]], [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
alphabets, ALPHABETS = "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
MOD, INF = 1000000007, float("inf")

def main():
    N = I()
    ABCDE = IR(5)
    print(5 + N // min(ABCDE) - int(min(ABCDE) == 1))

if __name__ == '__main__':
    main()

Solution (Python):
import math
import numpy as np
N,*T = map(int,open(0).read().split())

X = np.array(T).min()

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

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

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

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

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, *A = map(int, read().split())

    ans = 0
    for i in range(5):
        res = (N + A[i] - 1) // A[i] + 4
        if ans < res:
            ans = res

    print(ans)
    return


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
time = [int(input()) for _ in range(5)]
count = 0
if all([i >= n for i in time]):
    print(5)
else:
    smallest = min(time)
    smallest_index = time.index(smallest)
    count += n // smallest
    if n % smallest != 0:
        count += 1
    print(count + 4)

Solution (Python):
n = int(input())
time = [int(input()) for _ in range(5)]
count = 0
if all([i >= n for i in time]):
    print(5)
else:
    smallest = min(time)
    smallest_index = time.index(smallest)
    count += n // smallest
    if n % smallest != 0:
        count += 1
    print(count + 4)

Solution (Python):
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
sys.setrecursionlimit(500*500)
import itertools
from collections import Counter,deque

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


if __name__=="__main__":
    main()

Solution (Python):
import math
N = int(input())
X = [int(input()), int(input()), int(input()), int(input()), int(input())]

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

Solution (Python):
import math

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

Solution (Python):
import math

N=int(input())
A=[int(input()) for _ in range(5)]
n=min(A)
for i in range(5):
  if n==A[i]:
    p=i
    break
k=math.ceil(N/n)
print(k+4)

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

Solution (Python):
import math
n = int(input())
lis = [int(input()) for i in range(5)]
print(math.ceil(n / min(lis)) + 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):
N = int(input())
A = [int(input()) for i in range(5)] 
B = [0] * 6 
cnt = 0


P = [0] * 9
B[0] = 10**15
for m in range(9):
    for i in range(5,0,-1):
        B[i] += min(A[i-1],B[i-1])
        B[i-1] -= min(A[i-1],B[i-1])
        
    P[m] = B[5]
    cnt += 1

x = N // P[-1]
y = N % P[-1]
if y == 0:
    print(5*x+4)
    exit(0)
for j in range(7,2,-1):
    if P[j]<y:
        time = 5 * x + j + 2
        print(time)
        exit(0)

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

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

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

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




def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))


def main():
	n=II()
	A=[II() for _ in range(5)]
	print(5+(n-1)//min(A))









if __name__ == "__main__":
	main()

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




def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))



def main():
	n=II()
	A=[II() for _ in range(5)]
	print(5+(n-1)//min(A))









if __name__ == "__main__":
	main()

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




def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))


import numpy as np

def main():
	n=II()
	A=[II() for _ in range(5)]
	print(5+(n-1)//min(A))









if __name__ == "__main__":
	main()

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




def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))


import numpy as np

def main():
	n=II()
	A=[II() for _ in range(5)]
	ans=0

	for i in A:
		ans=max(ans,(n-1)//i)

	ans+=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 = min(a, b, c, d, e)
ans = 4 + n//x
if n%x != 0:
    ans += 1
print(ans)

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

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

min_value = min(move)
group_count = -(-N // min_value)


print(group_count - 1 + 5)

Solution (Python):
import math
N = int(input())
move = []
for i in range(5):
    move.append(int(input()))
movemin=min(move)
if movemin>=N:
    ans=5
else:
    ans=(math.ceil(N/movemin))+4

print(ans)

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

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

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

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

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

Solution (Python):
n = int(input())
a = list(int(input()) for _ in range(5))
Min = min(a)

if n <= Min:
    print(5)
    exit()

x = n//Min
if n%Min != 0: x += 1
print(4-a.index(Min)+x+a.index(Min))

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

Solution (Python):
import math
from decimal import Decimal

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)

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()

def time_to_zero(n, carry):
    ans = 0
    amari = 0
    if n % carry:
        amari = 1
    return n // carry + amari

def main():
    N = I()
    l = []
    ans = 0
    for i in range(5):
        al = I()
        l.append(al)
    A, B, C, D, E = l
    m = min(l)
    minute = 0
    if N % m != 0:
        minute += 1
    minute += N // m
    minute += 4
    print(minute)
    
    
    
    
    
    
    
main()

Solution (Python):

import sys 
import math
input = sys.stdin.readline

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

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

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

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

Solution (Python):
n = int(input())
T=[]
for i in range(5):
    T.append(int(input()))
mt=min(T)
ans = n//mt-1 if n%mt==0 else n//mt
ans += 5
print(ans)

Solution (Python):
import math
from decimal import Decimal

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)

print(math.ceil(Decimal(n)/Decimal(s) + 4))

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

m = min(a)

t = (n-1) // m

print(t+5)

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

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

Solution (Python):
def readinput():
    n=int(input())
    a=int(input())
    b=int(input())
    c=int(input())
    d=int(input())
    e=int(input())
    return n,a,b,c,d,e

def main(n,a,b,c,d,e):
    r=min(a,b,c,d,e)
    m=n//r
    if n%r!=0:
        m+=1
    return m+4

if __name__=='__main__':
    n,a,b,c,d,e=readinput()
    ans=main(n,a,b,c,d,e)
    print(ans)

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

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

Solution (Python):
n = int(input())
a = []
for _ in range(5):
    a.append(int(input()))
min_num = a[0]
for i in range(5):
    if min_num > a[i]:
        min_num = a[i]
res = n // min_num + 5
if n % min_num == 0:
    res -= 1
print(res)

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

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

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 X >= N:
  print(5)
else:
  if N%X == 0:
    print(4+N//X)
  else:
    print(5+N//X)

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

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

answer = 5 + N // minTransmit

if minTransmit == 1:
    answer -= 1
    
print(answer)

Solution (Python):
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
def f(x,y):
    return int((x+y-1)/y)

if e<d:
    d=e
if d<c:
    c=d
if c<b:
    b=c
if b<a:
    a=b
print(f(n,a)+4)

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

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

Solution (Python):
n,*cap=map(int,open(0).read().split())

m=min(cap)

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

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

min_limit = min(a, b, c, d, e)
if n % min_limit == 0:
    cnt = n // min_limit
else:
    cnt = n // min_limit + 1
print(5 + cnt - 1)

Solution (Python):
import bisect, copy, heapq, math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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


ans=4
for i in range(5):
    if min(abcde)==abcde[i]:
        ans+=math.ceil(n/abcde[i])
        break
print(ans)

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

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

Solution (Python):







def solve(n,l):
  return (n - 1)//min(l) + 5



def main():
  N = int(input())
  l = [int(input()) for _ in range(5)]
  print(solve(N,l))
  return

if __name__ == '__main__':
  main()