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, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-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 pf(s): return print(s, flush=True)

N = I()

l = []
for i in range(5):
    l.append(I())

min_value = min(l)
hoge = math.ceil(N / min_value)

print(hoge+4)

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

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

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

Solution (Python):
import math
def start_process(length, num):

    print(ans)

def main():
    N = int(input())
    a = [int(input()) for i in range(5)]
    min_data = min(a)
    ans = 4 + math.ceil(N / min_data)
    print(ans)

def kari():
    a = list(map(int, input().split()))
    a, b = map(int, input().split())

if __name__ == '__main__':
    main()

Solution (Python):
def int_raw():
    return int(input())

def ss_raw():
    return input().split()

def ints_raw():
    return list(map(int,ss_raw()))

N = int_raw()
poss = []
for i in range(5):
    p = int_raw()
    poss.append(p)

def main():
    minp = min(poss)
    return ((N+minp-1)//minp)+4

print(main())

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

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

Solution (Python):

import itertools
import sys
import math
from functools import lru_cache





from queue import Queue
from operator import mul
from functools import reduce
from queue import Queue
from operator import mul
from functools import reduce
from functools import lru_cache

input = sys.stdin.readline













n = int(input())

mm = 9999999999999999

ll = []
for i in range(5):
    mm = min(mm, int(input()))
    

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

Solution (Python):
n = int(input())
a = []
a.append(int(input()))
a.append(int(input()))
a.append(int(input()))
a.append(int(input()))
a.append(int(input()))

min_a = min(a)
ans = n // min_a
if n % min_a != 0:
    ans += 1
ans += 4


print(ans)

Solution (Python):
import math

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

Solution (Python):
import math

N = int(input())

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

bottle_neck = min(vals)


print(math.ceil(N/bottle_neck) + 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)

count = 5 + ((n-1)//min_)

print(count)

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

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)>=n:
  print(5)
else:
  print((n+min(a,b,c,d,e)-1)//min(a,b,c,d,e)+4)

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

Solution (Python):
import math

N = int(input())

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

a = min(A)

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

Solution (Python):
import atexit
import io
import sys
from math import *

buff = io.BytesIO()
sys.stdout = buff


@atexit.register
def write():
    sys.__stdout__.write(buff.getvalue())


n = input()
l = []
for i in xrange(5):
	l.append(input())
l.sort()
trips = int(ceil(n/float(l[0])))
print 5 + trips-1

Solution (Python):
def inpl(): return list(map(int, input().split()))

X = [0]*6
for i in range(6):
    X[i] = int(input())
print(-(-X[0]//min(X[1:])) + 4)

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

min_a = 10 ** 18
for i in range(5):
    a = int(input())
    min_a = min(a, min_a)

n = -(-N // min_a)
n -= 1

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

Solution (Python):
n=int(input());a=[int(input())for _ in range(5)];a.sort();print(((n-1)//a[0])+5)

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

print(solve())

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

Solution (Python):
import math
def solve(n, a, b, c, d, e):
    return math.ceil(n / min(a, b, c, d, e)) + 4



if __name__ == "__main__":
    n = int(input())
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())
    print(solve(n, a, b, c, d, e))

Solution (Python):
import math

def main(n, m):
    rissoku = min(m)

    retval = 4 + math.ceil(n/rissoku)
    
    return '{}'.format(int(retval))

if __name__ == '__main__':
    try:
        m = []
        n = int(input().strip())
        for i in range(5):
            m.append(int(input().strip()))
        print('{}'.format(main(n, m)))
    except EOFError:
        pass

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

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

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

index = 0
mi = num[0]
for i in range(5):
    if num[i] < mi:
        index = i
        mi = num[i]

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

Solution (Python):
N=int(input())
X=[int(input()) for i in range(5)]
bef=float('inf')
for x in X:
    if bef>x:
        now=(N+x-1)//x
        bef=x
print(now+4)

Solution (Python):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
num = min(A, B, C, D, E)
if N <= num:
    print(5)
else:
    print((N+num-1)//num+4)

Solution (Python):

import math
N=int(input())
A=[int(input()) for i in range(5)]
n=math.ceil(N/min(A))
print(5+n-1)

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

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

Solution (Python):

N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
import numpy as np

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

print(int(np.ceil(N/F))+4)

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

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

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

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

Solution (Python):

N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
R = min([A, B, C, D, E])

t = N // R
if N % R != 0:
    t += 1
print(t+4)

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

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

r = min(A, B, C, D, E)
ans = 4 + int((N+r-1)/r)

print(ans)

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