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.



Sample input:
5
3
2
4
3
5


Sample output:
7

Submission status: Wrong Answer

Solution code:
N = int(input())
P = []
for i in range(5):
    P.append(int(input()))
print(N // min(P) + 5)

Submission status: Wrong Answer

Solution code:
n = int(input())

trans = []

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

import numpy as np

trans = np.sort(np.array(trans))[0]

if trans > n:
    print(5)
else:
    print(5 + n // trans)

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
time_list = [int(input()) for _ in range(5)]

bottle_neck = min(time_list)
ans = 5
if bottle_neck<N:
    ans += N//bottle_neck
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int, [input() for i in range(5)]))

minn = min(L)
if minn < N:
    sum1 = 0
    sum2 = 0
    sum1 = N // minn
    sum2 = N % minn
    print(sum1+sum2-1+5)
else:
    print(5)

Submission status: Wrong Answer

Solution code:
n = int(input())
A = [int(input()) for _ in range(5)]
ans = 5
top = n
for a in A:
    if top > a:
        ans += -(-top // a) - 1
        top = a
print(ans)

Submission status: Wrong Answer

Solution code:
N=input()
L=[ input() for i in range(5) ]
m=min(L)

if N<=m:
	print 5
else:
	print 5+N/m

Submission status: Wrong Answer

Solution code:
from collections import defaultdict as ddic
from collections import deque
from itertools import combinations, permutations, product
import bisect
import heapq
import math
import sys

stdout = sys.stdout
rr = lambda: input().strip()
rri = lambda: int(rr())
rrm = lambda: list(map(int, rr().split()))


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

tiny = min([a,b,c,d,e])
if n >= tiny:
    print(5)
else:
    print(5 + (n//tiny))

Submission status: Wrong Answer

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

wait = max([int(n/w) for w in [a,b,c,d,e]])
print(5 + wait)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import math

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

time = 0

for i in range(5):
  time += max(math.ceil(N / abcde[i]), 1)
  if i < 4:
    N = max(N - abcde[i+1] * (time-1), 0)

print(time)

Submission status: Wrong Answer

Solution code:
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(5 + (N // m))

Submission status: Wrong Answer

Solution code:
n,*a=map(int,open(0).read().split())
b=min(a)
if b==1:
    print(9)
elif b<n:
    print(n//b+(n%b>0)-1+5)
else:
    print(print(5))

Submission status: Wrong Answer

Solution code:
import sys
import math
A = [int(input()) for _ in range(6)]

if min(A) >= A[0]:
    print(5)
    sys.exit()
    
B = list(A)

for i in range(5):
    if B[i+1] > B[i]:
        B[i+1] = B[i]

count = 0
for i in range(5):
    if B[i+1] < B[i]:
        count += math.ceil(B[i]/B[i+1])-1
        
print(count+5)

Submission status: Wrong Answer

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

print(5 + int(N / min(A, B, C, D, E) - 1e-6))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for _ in range(5):
    x = int(input())
    if n%x == 0:
        ans += n//x
        n = x
    else:
        ans += n//x+1
        n = x
print(ans)

Submission status: Wrong Answer

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

rissoku = N//min(T)
ans = rissoku + 5
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
people = [int(input()) for _ in range(5)]
max_turn = max(map(lambda x: N // x + 1, people))
print(max_turn + 4)

Submission status: Wrong Answer

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

l=[a,b,c,d,e]
min=a
for x in l:
    if x<min:
        min=x
ans=(n//min)+5
print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

list=[]

n=int(input())

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

list=sorted(list)
#print(list)

#print(list)

min=list[0][0]

neck=int((((n-(n%min))/min)+1))
print(neck+4)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
l=[a,b,c,d,e]
x=n//min(l)
print(5+x)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
move_list = [int(input()) for _ in range(5)]
time = 0
time_a = math.ceil(n/move_list[0])
time_b = max(time_a+1, math.ceil(n/move_list[1])+1)
time_c = max(time_b+1, math.ceil(n/move_list[2])+1)
time_d = max(time_c+1, math.ceil(n/move_list[3])+1)
time_e = max(time_d+1, math.ceil(n/move_list[4])+1)
print(time_e)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for _ in range(5):
    x = int(input())
    if n%x == 0:
        ans += n//x
        n = x
    else:
        ans += n//x+1
        n = x
    print(ans)

Submission status: Wrong Answer

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

print(n//min(a) + 5)

Submission status: Wrong Answer

Solution code:
IN = [int(input()) for i in [0]*6]
N = IN[0]
AE = IN[1:]
P = [N,0,0,0,0,0]

bn = min(AE)

print(N//bn + 5)

Submission status: Wrong Answer

Solution code:
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = s_inpl()   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = inpl()	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]

import math
import copy
from collections import defaultdict, Counter
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
from bisect import bisect_left, bisect_right
# import numpy as np

def i_inpl(): return int(input())
def s_inpl(): return map(int,input().split())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")

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

t = 0
lmin = min(l)
print(N//lmin+5)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[]
for i in range(5):
    l.append(int(input()))
m=min(l)
if n<=m:
    print(5)
else:
    k=n//m+1
    print(k+4)

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
A=[int(input()) for _ in range(5)]
MA=min(A)
print(N//MA+5)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = [int(input()) for _ in range(5)]

time = 5 + int(n/min(a))

print(time)

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc123/tasks/abc123_c

import itertools
import collections
import bisect
import math

def main():
    N = int(input())
    last = N
    q = []
    for i in range(5):
        s = int(input())
        q.append(min(last, s))
        last = s

    f_step = math.ceil(N / q[0])
    ans = f_step
    # print(q)
    # print("ans = {}".format(ans))
    for i in range(1, 5):
        if q[i] < q[i-1]:
            # print("math.ceil(q[i] / q[i-1]) = {}".format(math.ceil(float(q[i]) / float(q[i-1]))))
            ans += math.ceil(q[i-1] / q[i])
        else:
            ans += 1
        # print("ans = {}".format(ans))

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N, trans = int(input()), [int(input()), int(input()), int(input()), int(input()), int(input())]

persons = [N, 0, 0, 0, 0, 0]

min_trans = min(trans)

print(int(N/min_trans) + 5)

Submission status: Wrong Answer

Solution code:
import numpy as np


n = int(input())
minlim = 10**15
for i in range(5):
    lim = int(input())
    if lim < minlim:
        minlim = lim

if minlim < n:
    print((n+1)//minlim + 4)
else:
    print(5)

Submission status: Wrong Answer

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

minTrans = min( A[0], A[1] )
for i in range(2,5):
    minTrans = min( minTrans, A[i] )

print( N//minTrans + 5 )

Submission status: Wrong Answer

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

st = []
st += [a,b,c,d,e]

print(n // min(st) + 5)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
min_a = 10**15
for i in range(5):
    a.append(int(input()))
    if a[-1] < min_a:
        min_a = a[-1]

if min_a >= n:
    print(5)
else:
    print(int(n/min_a)+5)

Submission status: Wrong Answer

Solution code:
import sys
import math
A = [int(input()) for _ in range(6)]

if min(A) >= A[0]:
    print(5)
    sys.exit()
    
B = list(A)

for i in range(5):
    if A[i+1] > A[i]:
        B[i+1] = B[i]

count = 0
for i in range(5):
    if B[i+1] < B[i]:
        count += math.ceil(B[i]/B[i+1])-1
        
print(count+5)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
A = sorted([int(input()) for i in range(5)])
math.ceil(N/A[0]+4)

Submission status: Wrong Answer

Solution code:
L = [int(input()) for i in range(6)]

cnt = 0
for i in range(5):
    if L[i] < L[i+1]:
        L[i+1] = L[i]
    else:
        cnt += L[i] // L[i+1]

print(5 + cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
mins = [(int(input()),idx) for idx in range(5)]
ans = n // min(mins)[0] + 1 * ((n%(min(mins)[0]))>1)
print(ans+4)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = [int(input()) for i in range(5)]
a.sort()
print((N//a[0]+1)+4 if N//a[0] != 0 else (N//a[0])+4)

Submission status: Wrong Answer

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

a = min(x)
if a >= N:
    print(5)
else:
    n = N - a
    ans = n // a + n % a
    ans += 5
    print(ans)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
a = [0 for i in range(5)]
n = int(input())
for i in range(5):
    a[i] = int(input())
time = n // a[0] + 1
for i in range(4):
    if a[i] > a[i+1]:
        time += (n // a[i+1] - n // a[i])
    time += 1
print(time)

Submission status: Wrong Answer

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

print(5 + int(N / min(A, B, C, D, E)))

Submission status: Wrong Answer

Solution code:
N = int(input())
time = [int(input()) for _ in range(5)]

cnt = 0
neck = float("inf")
for i in range(5):
  if i == 0 or time[i] < neck:
    cnt += int(N / time[i]) + 1
    neck = time[i]
  else:
    cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
mins = [(int(input()),idx) for idx in range(5)]
ans = n // min(mins)[0] - 1 * ((n%(min(mins)[0]))>1)
print(ans+5)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 
import math
import sys
import itertools
import numpy as np

n =int(input())

m = -1
a = 999998888899999

# n行の数をリストへ
t = [int(input()) for i in range(5)] 

for i in range(5):
    if t[i] <= a:
        m=i
        a=t[i]

answer = n//a
if n % a == 0:
    answer += 1
answer += 5
print( answer )

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read() for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


N = read_a_int()
A = read_col(5, 1)[0]

# 一番小さい人数のところがボトルネック

key = min(A)

print(N//key + 5)

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    s = IR(5)
    k = I()
    if max(s)-min(s) > k:
        print(":(")
    else:
        print("Yay!")
    return

#B
def B():
    s = IR(5)
    s.sort(key = lambda x:-x%10)
    ans = 0
    i = 0
    k = 0
    while 1:
        if i%10 == 0:
            ans = i+s[k]
            i += s[k]-1
            k += 1
            if k == 5:break
        i += 1
    print(ans)
    return

#C
def C():
    n = I()
    a = IR(5)
    ans = 5+n//min(a)
    if n == min(a):ans -= 1
    print(ans)
    return

#D
def D():
    x,y,z,k = LI()
    a = LI()
    b = LI()
    c = LI()

    return

#Solve
if __name__ == "__main__":
    C()

Submission status: Wrong Answer

Solution code:
#coding: utf-8
N = int(input())
l = []
for i in range(5):
    l.append(int(input()))
min_index = l.index(min(l))
total = N // min(l) if N % 2 == 0 else N // min(l) + 1
print(total + len(l) - min_index)

Submission status: Wrong Answer

Solution code:
n=int(input())
an=[int(input()) for _ in range(5)]
print(n//min(an)+5)

Submission status: Wrong Answer

Solution code:
n=int(input())
norimono=[]
for i in range(5):
    norimono.append(int(input()))
answer=int(n/(min(norimono)))+5
print(answer)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
from string import ascii_uppercase
import sys, bisect
stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

N = read_int()[0]
cap = [read_int()[0] for _ in range(5)]

def solve():
    b_neck = cap[0]
    b_ni = 0
    for i in range(5):
        if b_neck > cap[i]:
            b_neck = cap[i]
            b_ni = i
    till_neck = b_ni
    in_neck = N // b_neck
    to_last = 5 - b_ni
    ans = till_neck + in_neck + to_last
    return ans

if __name__ == "__main__":
    print(solve())

Submission status: Wrong Answer

Solution code:
# coding: utf-8
ns = [int(input()) for _ in range(6)]
ans = 5
min_n = min(ns[1:])
if ns[0] != min_n:
    ans += ns[0] // min_n
print(ans)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
p = []
for _ in range(5):
    p.append(int(input())) 

print(math.floor(N / min(p)) + 5)

Submission status: Wrong Answer

Solution code:
N=int(input())
TOSHI=[int(input()) for _ in range(5)]
COST=int(N/min(TOSHI)) if N!=min(TOSHI) else 0
print(5+COST)

Submission status: Wrong Answer

Solution code:
import sys

stdout = sys.stdout
rr = lambda: input().strip()
rri = lambda: int(rr())
rrm = lambda: list(map(int, rr().split()))


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

tiny = min([a,b,c,d,e])
print(5 + (n//tiny))

Submission status: Wrong Answer

Solution code:
n = int(input())
mins = [(int(input()),idx) for idx in range(5)]
ans = n // min(mins)[0] + 1 * ((n%(min(mins)[0]))>1)
print(ans+5)

Submission status: Wrong Answer

Solution code:
N=int(input())
num=[]

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

num_s=sorted(num)
if N%num_s[0]==0:
    print(N/num_s[0]+4)
else:
    print(int(N/num_s[0])+5)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = [int(input()) for _ in range(5)]
min_a = min(a)
idx = a.index(min_a)
if N % min_a == 0:
    print(4+(N/min_a))
else:
    print(5+(N//min_a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
A = []
N = int(input())
for i in range(5):
  A.append(int(input()))
a = min(A)
print(5 + math.floor(N / a))

Submission status: Wrong Answer

Solution code:
import math

an = []
for i in range(6):
    temp = input()
    an.append(int(temp))

N = an[0]
an.pop(0)

print(int(N/min(an)) + 5)

Submission status: Wrong Answer

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

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

num_group = int(N / cap + 0.5)

ans = 6 + num_group - 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
min_a = 10**15
for i in range(5):
    a.append(int(input()))
    if a[-1] < min_a:
        min_a = a[-1]

print(int(n/min_a)+5)

Submission status: Wrong Answer

Solution code:
n,*t=map(int,open(0).read().split())
print(n//min(t)+5)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
su = 0
for i in range(5):
    k = int(input())
    a.append([k,-(-1*n//k)])

for i in range(5):
    if i == 0:
        su += a[i][1] - 1
    else:
        if a[i-1][1] < a[i][1]:
            su += a[i][1]
        else:
            su += 1
print(su)

Submission status: Wrong Answer

Solution code:
from functools import reduce

def main():
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    # 1e10

    # 初期値用:十分小さい数(-100億)
    # -1e10
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    N = int(input().rstrip())
    S = []
    S.append(int(input().rstrip()))
    S.append(int(input().rstrip()))
    S.append(int(input().rstrip()))
    S.append(int(input().rstrip()))
    S.append(int(input().rstrip()))
    min_s = min(S)
    print(N//min_s + 5)
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
list = []
for i in range(5):
    a = int(input())
    list.append(a)
visit = [n,0,0,0,0,0]

cnt = 0

min = 10**16
min_ind = 0
for i in range(5):
    if min > list[i]:
        min = list[i]
        min_ind = i

print(5 - min_ind + n // list[min_ind] + min_ind)

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    s = IR(5)
    k = I()
    if max(s)-min(s) > k:
        print(":(")
    else:
        print("Yay!")
    return

#B
def B():
    s = IR(5)
    s.sort(key = lambda x:-x%10)
    ans = 0
    i = 0
    k = 0
    while 1:
        if i%10 == 0:
            ans = i+s[k]
            i += s[k]-1
            k += 1
            if k == 5:break
        i += 1
    print(ans)
    return

#C
def C():
    n = I()
    a = IR(5)
    ans = 5+n//min(a)
    print(ans)
    return

#D
def D():
    x,y,z,k = LI()
    a = LI()
    b = LI()
    c = LI()

    return

#Solve
if __name__ == "__main__":
    C()

Submission status: Wrong Answer

Solution code:
N = int(input())
min_cap = float('inf')
for i in range(5):
    temp = int(input())
    min_cap = min(min_cap, temp)
print(5 + N // min_cap)

Submission status: Wrong Answer

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

if N == min(A,B,C,D,E):
    count = 0
else:
    count = N // min(A,B,C,D,E)
print(count+5)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [0] * 5
A[0] = int(input())
A[1] = int(input())
A[2] = int(input())
A[3] = int(input())
A[4] = int(input())

ans = 0
tmp = N
for i in range(5):
    if tmp > A[i]:
        ans += (tmp + A[i]-1) // A[i]
        tmp = A[i]
    else:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
trans = [int(input()) for _ in range(5)]
print(5 + N // min(trans))

Submission status: Wrong Answer

Solution code:
import math

N = 5
A = 3
B = 2
C = 4
D = 3
E = 5
M = min(A,B,C,D,E)

print(5+math.ceil(N/M)-1)

Submission status: Wrong Answer

Solution code:
n = int(input())
mi = 10**15
def kiri(n):
  if n == int(n):
    return n
  else:
    return int(n)+1
for i in range(5):
  xi = int(input())
  if xi < mi:
    mi = xi
print(kiri(n/mi) + 4)

Submission status: Wrong Answer

Solution code:
n = int(input())
mins = [(int(input()),idx) for idx in range(5)]
ans = n // min(mins)[0]
print(ans+5)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(input()) for i in range(5)]
print(5 + N // min(A))

Submission status: Wrong Answer

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

data_list = [a,b,c,d,e]
min_data = min(data_list)
print(N//min_data+5)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[int(input()) for _ in [0]*5]
ans=10*16
ind=0
for i in range(5):
    if a[i]<ans:
        ind=i
        ans=a[i]
print(5+(n-1)//ans)

Submission status: Wrong Answer

Solution code:
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)
nn = n // mini
print(nn+5)

Submission status: Wrong Answer

Solution code:
from math import ceil
N = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
li = [a, b, c, d, e]
exist = [N, 0, 0, 0, 0, 0]
cnt = []
for i in range(5):
    cnt.append(ceil(N / li[i]))
ans = cnt[0]
an = [cnt[0]]
for i in range(1, 5):
    an.append(max(1, cnt[i] - (cnt[i - 1] - 1)))
    ans += max(1, cnt[i] - (cnt[i - 1] - 1))
# print(an)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
t = [ int(input()) for _ in range(5) ]
a = min(t)
 
print(5+(N+1)//a)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
def solve():
    min_time = min([A,B,C,D,E])
    if(N%min_time==0):
        return print(5 + N/min_time - 1)
    else:
        return print(5 + int(N/min_time))
solve()

Submission status: Wrong Answer

Solution code:
a=[]
N = int(input())
for i in range(5):
    a.append(int(input()))
print(N//min(a)+5)

Submission status: Wrong Answer

Solution code:
n = int(input())
lst = [int(input()) for _ in range(5)]

def calcu(a, b):
    if a % b == 0:
        return a//b
    else:
        return a//b + 1

ans = calcu(n, lst[0])
pace = lst[0]

for i in range(1,5):
    if pace > lst[i]:
        ans = calcu(n, lst[1]) + i
        pace = lst[i]
    else:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:

def main():
    n = int(input())
    a = []
    for i in range(5):
        a.append(int(input()))

    print(int(n//min(a))+5)


main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

def io_generator():
	return input()

#+++++++++++++++++++
	
def ku(n,a):
	if n % a==0:
		return n/a
	return (n // a)+1
	
def main(io):
	n=int(io())
	l =[ int(io()) for _ in range(5)]
	bn=min(l)
	nd=ku(n,bn)
	return 4+nd

#++++++++++++++++++++

if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

Submission status: Wrong Answer

Solution code:
N = int(input())
a = []
for i in range(5):
    a.append(int(input()))
print(N // min(a) + 5)

Submission status: Wrong Answer

Solution code:
lists = []
import math

N=int(input())
for _ in range(5):
    lists.append(int(input()))

print(int(math.floor(N/min(lists))+5))

Submission status: Wrong Answer

Solution code:
n,*a=map(int,open(0).read().split())
b=min(a)
if b<n:
    print(n//b+(n%b>0)-1+5)
else:
    print(print(5))

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())
    e = int(input())

    if N==1:
        print(5)
        return

    m = min([a,b,c,d,e])  # bottle neck

    ans = (N//m) + (N%m==0) + 1
    ans += 4

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 
import math
import sys
import itertools
import numpy as np

n =int(input())

m = -1
a = 999998888899999

# n行の数をリストへ
t = [int(input()) for i in range(5)] 

for i in range(5):
    if t[i] <= a:
        m=i
        a=t[i]

answer = n//a
#if n % a >0:
#    answer += 1
answer += 5
print( answer )