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):
from math import ceil
n = int(input())
l = [int(input()) for _ in range(5)]
Min = min(l)
print(ceil(n/Min) + 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())
l = [a,b,c,d,e]
rissoku = min(l)
amari = n % rissoku
syou = n // rissoku
if amari == 0:
    print(syou + 4)
else:
    print(syou + 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):
import math

number_of_people = int(input())
minutes = [int(input()) for i in range(5)]

minimum_throughput = min(minutes)
total_elapsed_minute = 4 + math.ceil(number_of_people / minimum_throughput)

print(total_elapsed_minute)

Solution (Python):

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

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

Solution (Python):
import math

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

tmp = [a,b,c,d,e]

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

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

t=int(input())
for _ in range(4):
  t=min(t,int(input()))
ans=(n+t-1)//t+4
print(ans)

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)

if N%F != 0:
    time = N//F + 5
else:
    time = N//F + 4

print(time)

Solution (Python):
import numpy as np
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

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

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

Solution (Python):

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = [0] * 5
for i in range(5):
    A[i] = ir()

mi = min(A)
plus = -(-N//mi)
answer = 4 + plus
print(answer)

Solution (Python):
import math
N = int(input())
l = [int(input()) for _ in range(5)]
mn_move = min(l)
ans = math.ceil(N/mn_move)+4
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())
    city = [0] * 6
    city[0] = n
    ans = 0
    ans = math.ceil(n / min(a,b,c,d,e) + 4)
    print(ans)

def isFinished(city, n):
    if city[-1] == n:return True
    return False

if __name__ == '__main__':
    main()

Solution (Python):
import sys

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

def main():
    print((n + m - 1) // m + 4)

if __name__ ==  '__main__':
    main()

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

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

Solution (Python):
N = int(input())
min = 10**15+1
for i in range(5):
    t = int(input())
    if min > t:
        min = t
a = N + min - 1
print(a//min + 4)

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

Solution (Python):










mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    
    
    
    
    
    
    
    
    
    n = int(input())
    bottleneck = float('inf')
    A = []
    for i in range(5):
        a = int(input())
        A.append(a)
    for i in range(5):
        bottleneck = min(bottleneck,A[i])
    
    print((n + bottleneck - 1) // bottleneck + 4) 

if __name__ == '__main__':
  main()

Solution (Python):


int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

from math import ceil

n = II()
a = II()
b = II()
c = II()
d = II()
e = II()

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



if __name__ == '__main__':
    solve()

Solution (Python):

import sys
input = sys.stdin.read
n,*a, = map(int, input().split( ))
m = min(a)
ans = (n+m-1)//m + 4
print(ans)

Solution (Python):
import sys
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())
    print(-(-n//min(a,b,c,d,e))+4)

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

import math
ans = math.ceil(n/a)
if a<=b:
    ans += 1
else:
    ans = math.ceil(n/b)+1
if b<=c:
    ans += 1
else:
    ans = math.ceil(n/min(c,a))+2
if c<=d:
    ans += 1
else:
    ans = math.ceil(n/min(d,b,a))+3
if d<=e:
    ans += 1
else:
    ans = math.ceil(n/min(e,a,b,c))+4
print(ans)

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

Solution (Python):
N=int(input())
path=[int(input()) for _ in range(5)]
time=0
for i in range(5):
    time=max(((N+path[i]-1)//path[i])+i,time+1)
print(time)

Solution (Python):
n=int(input())
a=int(10**15+1)
for _ in range(5):
    b=int(input())
    a=min(a,b)
if a>=n:
    ans=5
else:
    ans=5+(n-1)//a
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):
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)
print(math.ceil(N/S)+4)

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

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

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

Solution (Python):
n = int(input())
l = [int(input()) for _ in range(5)]
key = min(l)
ans = 5 + n // key + (1 if n % key > 0 else 0) - 1
print(ans)

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

Solution (Python):

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

x = min(l)

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

Solution (Python):
List = []
for _ in range(6):
  List.append(int(input()))
Count = 5
MIN = min(List[1],List[2],List[3],List[4],List[5],)
Count += List[0]//MIN if List[0]%MIN != 0 else (List[0]//MIN)-1

print(Count)

Solution (Python):
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))

def main():
    n = II(); a = II(); b = II()
    c = II(); d = II(); e = II()
    minv = min([a,b,c,d,e])
    t = n//minv
    if n%minv != 0: t += 1
    print(4+t)


if __name__ == '__main__':
    main()

Solution (Python):

import sys
input = sys.stdin.readline
from math import ceil,floor









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

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

Solution (Python):
import math
n = int(input())
mn = float("inf")
for i in range(5):
  ai = int(input())
  if mn > ai:
    mn = ai
print(4+math.ceil(n/mn))

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

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

Solution (Python):
import math
e=[int(input()) for i in range(6)]
ans=5+math.ceil(e[0]/min(e[1:])-1)
print(ans)

Solution (Python):

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

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

Solution (Python):
from math import factorial,sqrt,ceil













rows = [int(input()) for _ in range(6)]
n,a,b,c,d,e = rows
minvar = min(rows[1:])

ans = ceil(n/minvar) + 4

print(ans)

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

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

Solution (Python):
import math

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

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

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

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

cap = [N] + [int(input()) for _ in range(CITIES - 1)]

def ceil(n, m):
    return -(-n // m)

dp = [0] * CITIES 
mincap = N
for i in range(1, CITIES):
    if mincap <= cap[i]:
        dp[i] = dp[i - 1] + 1
    else:
        dp[i] = ceil(N, cap[i]) + i - 1
    mincap = min(mincap, cap[i])

print(dp[CITIES - 1])

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

Solution (Python):
def main():
    N, *M = (int(input()) for _ in range(6))

    mi = min(M)

    ans = 5 + (N - 1) // mi + 1 - 1
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
mod = 10 ** 9 + 7
mod2 = 2**61+1
from collections import deque
import heapq
from bisect import bisect_left, insort_left, bisect_right

_NUMINT_ALL = list(range(10))

def main():
    ans = solve()
    if ans is not None:
        print(ans)

def solve():
    N = iip(False)

    l = iipt(5)
    

    m = min(l)
    mm = N // m
    if N % m != 0:
        mm += 1

    return 4+mm













def iip(listed=True, num_only = True):
    if num_only:
        ret = [int(i) for i in input().split()]
    else:
        ret = [int(i) if i in _NUMINT_ALL else i for i in input().split()]

    if len(ret) == 1 and not listed:
        return ret[0]
    return ret

def iipt(l, listed=False, num_only = True):
    ret = []
    for i in range(l):
        ret.append(iip(listed=listed, num_only=num_only))
    return ret

def iip_ord():
    return [ord(i) - ord("a") for i in input()]

def YesNo(s):
    if s:
        print("Yes")
    else:
        print("No")

def fprint(s):
    for i in s:
        print(i)

def bitall(N):
    ret = []
    for i in range(2**N):
        a = []
        for j in range(N):
            a.append(i%2)
            i //= 2
        ret.append(a)
    return ret

def split_print_space(s):
    print(" ".join([str(i) for i in s]))

def split_print_enter(s):
    print("\n".join([str(i) for i in s]))


def koenai_saidai_x_index(sorted_list, n):
    l = 0
    r = len(sorted_list)
    if len(sorted_list) == 0:
        return False
    if sorted_list[0] > n:
        return False

    while r - l > 1:
        x = (l + r) // 2
        if sorted_list[x] == n:
            return x
        elif sorted_list[x] > n:
            r = x
        else:
            l = x
    return l


def searchsorted(sorted_list, n, side="left"):
    if side not in ["right", "left"]:
        raise Exception("sideはrightかleftで指定してください")

    l = 0
    r = len(sorted_list)

    if n > sorted_list[-1]:
        
        return len(sorted_list)
    if n < sorted_list[0]:
        return 0

    while r - l > 1:
        x = (l + r) // 2
        if sorted_list[x] > n:
            r = x
        elif sorted_list[x] < n:
            l = x
        else:
            if side == "left":
                r = x
            elif side == "right":
                l = x

    if side == "left":
        if sorted_list[l] == n:
            return r - 1
        else:
            return r

    if side == "right":
        if sorted_list[l] == n:
            return l + 1
        else:
            return l


def soinsuu_bunkai(n):
    ret = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            ret.append(i)
        if i > n:
            break
    if n != 1:
        ret.append(n)
    return ret


def conbination(n, r, mod, test=False):
    if n <= 0:
        return 0
    if r == 0:
        return 1
    if r < 0:
        return 0
    if r == 1:
        return n
    ret = 1
    for i in range(n - r + 1, n + 1):
        ret *= i
        ret = ret % mod

    bunbo = 1
    for i in range(1, r + 1):
        bunbo *= i
        bunbo = bunbo % mod

    ret = (ret * inv(bunbo, mod)) % mod
    if test:
        
        pass
    return ret


def inv(n, mod):
    return power(n, mod - 2)


def power(n, p, mod_= mod):
    if p == 0:
        return 1
    if p % 2 == 0:
        return (power(n, p // 2, mod_) ** 2) % mod_
    if p % 2 == 1:
        return (n * power(n, p - 1, mod_)) % mod_


if __name__ == "__main__":
    main()

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

Solution (Python):
if __name__ == "__main__":
  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
import math
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
a = [I() for i in range(5)]

print(math.ceil(N/min(a))+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)
delay = math.ceil(N/bottle) - 1

print(5 + delay)

Solution (Python):
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

import math

n = ni()
a = nin(5)

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

Solution (Python):
N = int(input())
tmp = [0 for i in range(5)]
for i in range(5):
    tmp[i] = int(input())
tmp_min = min(tmp)
base = 0
if N % tmp_min == 0:
    base = N // tmp_min
else:
    base = N // tmp_min + 1

print(base + 4)

Solution (Python):
N = int(input())
T = [int(input()) for _ in range(5)]
print((N+min(T)-1)//min(T) + 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 math
n = int(input())
tra = [int(input()) for i in range(5)]
print(math.ceil(n/min(tra))+4)

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

Solution (Python):
from math import ceil
n=int(input())
min_val=min(int(input()),int(input()),int(input()),int(input()),int(input()))
m=ceil(n/min_val)
print(5+m-1)

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

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

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

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

Solution (Python):
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


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

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


if __name__ == '__main__':
    main()

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

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

cost = (N + (min_T - 1)) // min_T
ans = cost + 4
print(ans)

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

Solution (Python):
def main():
    N, *M = (int(input()) for _ in range(6))

    t = 10 ** 15 + 1
    ind = -1
    for i, x in enumerate(M):
        if x < t:
            t = x
            ind = i

    ans = 5 + (N - 1) // t + 1 - 1
    print(ans)


if __name__ == '__main__':
    main()

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

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

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

print(math.ceil((n-mini)/mini)+5)

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

x=min(s)
print(-(-n//x)+4)

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

Solution (Python):
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(4+math.ceil(N/Min))

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

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

Solution (Python):
from itertools import permutations
import sys

sys.setrecursionlimit(10 ** 6)
from bisect import *
from collections import *
from heapq import *

def II(): 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 SI(): return sys.stdin.readline()[:-1]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
int1 = lambda x: int(x) - 1
def MI1(): return map(int1, sys.stdin.readline().split())
def LI1(): return list(map(int1, sys.stdin.readline().split()))
p2D = lambda x: print(*x, sep="\n")
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

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

main()

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
e = [0] * 5
for i in range(5): e[i] = int(input())
print(-(-N // min(e)) + 4)

Solution (Python):
def main():
    N = int(input())
    T = [int(input()) for i in range(5)]
    minT = min(T)
    bo = (N + minT - 1)//minT
    print(4+bo)


if __name__ == '__main__':
    main()

Solution (Python):
n, a, b, c, d, e = [int(input()) for _ in range(6)]
min_ = min(a, b, c, d, e)
ans = -(-n // min_) + 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())


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

ans = 4 + N // x
if N % x != 0:
  ans += 1

print(ans)

Solution (Python):
from math import ceil


def main():
    l = [int(input()) for _ in range(6)]
    n, a, b, c, d, e = l
    group = ceil(n / min(a, b, c, d, e))
    print(4 + group)


if __name__ == '__main__':
    main()

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

Solution (Python):
import numpy as np
import sys
readline = sys.stdin.readline
read = sys.stdin.read

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

def kiriage(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1
		
x = np.array([a, b, c, d, e])
print(kiriage(n, np.min(x)) + 4)

Solution (Python):
import math

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

time = math.ceil(n / base[0])
base_min = base[0]

for i in range(1,5):
  if base_min <= base[i]:
    time = time + 1
  elif base[i] < base_min:
    time = time + math.ceil( (n - base[i]*(math.ceil(n/base_min)-1) )/base[i]) 
    base_min = base[i]
print(time)

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

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

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
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()
x = [I() for _ in range(5)]
m = min(x)
print((n-1)//m+1+4)

Solution (Python):

def resolve():
    '''
    code here
    '''
    import math
    N = int(input())
    trans_list = [int(input()) for _ in range(5)]

    min_tp = min(trans_list)
    
    print(math.ceil(N/min_tp) + 4)

if __name__ == "__main__":
    resolve()

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

Solution (Python):
import math

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

mini=math.ceil(N/min(A,B,C,D,E))

print(mini+4)

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

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

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)

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

Solution (Python):
def main():
    import math
    n, *p = map(int, open(0).read().split())
    x = min(p)
    t = math.ceil(n / x)
    ans = 5 + (t - 1)
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
a = []
mi = 10**20
for _ in range(5):
    i_ = int(input())
    mi = min(mi, i_)
print((n + mi - 1) // mi + 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
n=int(input())
l=[int(input()) for i in range(5)]
print(math.ceil(n/min(l))+4)

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

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)

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

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

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

    ans = n//mi + (4 if n%mi == 0 else 5)
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
import math

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

Solution (Python):
import math

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

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

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

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

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

Solution (Python):
import sys

n, *abcde = map(int, sys.stdin.read().split())
mi = min(abcde)
ans = abcde.index(mi) + (n + mi - 1) // mi + 5 - abcde.index(mi) - 1
print(ans)

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby
    
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    

    
    

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

if __name__ == '__main__':
    main()

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby
    
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    

    
    

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

if __name__ == '__main__':
    main()

Solution (Python):
import math
n,a,b,c,d,e = map(int, open(0).read().split())
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())
ct_list = [n,a,b,c,d,e]
for i in range(5):
  if ct_list[i] < ct_list[i+1]:
    ct_list[i+1] = ct_list[i]

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

Solution (Python):
import math

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

spent=[A,B,C,D,E]
limit=min(spent)
limit_index=spent.index(limit)
print(math.ceil(N/limit)-1+5)

Solution (Python):
N, a,b,c,d,e = [int(input()) for _ in range(6)]
m = min([a,b,c,d,e])
 
print((N//m + bool(N%m))+4)

Solution (Python):

N=int(input())
A=[int(input()) for i in range(5)]
if min(A)==1:
  print(int(N/min(A))+4)
else:
  print(int(N/min(A))+5)

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

t=0
x=np.argmin(A)

t+=x

t+=(N+A[x]-1)//A[x]

t+=4-x

print(t)

Solution (Python):
def main():
    N = int(input())
    A = []
    for i in range(5):
        A.append(int(input()))
    A.sort()
    if(N > A[0]):
        if(N % A[0] != 0):
            cnt = N//A[0]+1
        else:
            cnt = N//A[0]
    else:
        cnt = 1    
    print(cnt+4)
main()

Solution (Python):
N = int(input())
A = [0]*5
for i in range(5):
    A[i] = int(input())
    
if N % min(A) != 0:
    print(N//min(A)+5)
else:
    print(N//min(A)+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)

time = 0
if N%X !=0:
    time += N//X +5
else:
    time += N//X+4
print(time)

Solution (Python):
import math

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

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

print(total)

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(5)
else:
    n-=m
    ans=n//m
    if n%m:
        ans+=1
    print(5+ans)