Problem:


Score : 200 points

Problem Statement

Some number of chocolate pieces were prepared for a training camp.
The camp had N participants and lasted for D days.
The i-th participant (1 \leq i \leq N) ate one chocolate piece on each of the following days in the camp: the 1-st day, the (A_i + 1)-th day, the (2A_i + 1)-th day, and so on.
As a result, there were X chocolate pieces remaining at the end of the camp. During the camp, nobody except the participants ate chocolate pieces.

Find the number of chocolate pieces prepared at the beginning of the camp.

Constraints

1 \leq N \leq 100

1 \leq D \leq 100

1 \leq X \leq 100

1 \leq A_i \leq 100 (1 \leq i \leq N)

All input values are integers.

Input

Input is given from Standard Input in the following format:

N
D X
A_1
A_2
:
A_N

Output

Find the number of chocolate pieces prepared at the beginning of the camp.

Sample Input 1

3
7 1
2
5
10

Sample Output 1

8

The camp has 3 participants and lasts for 7 days.
Each participant eats chocolate pieces as follows:

The first participant eats one chocolate piece on Day 1, 3, 5 and 7, for a total of four.

The second participant eats one chocolate piece on Day 1 and 6, for a total of two.

The third participant eats one chocolate piece only on Day 1, for a total of one.

Since the number of pieces remaining at the end of the camp is one, the number of pieces prepared at the beginning of the camp is 1 + 4 + 2 + 1 = 8.

Sample Input 2

2
8 20
1
10

Sample Output 2

29

Sample Input 3

5
30 44
26
18
81
18
6

Sample Output 3

56



Sample input:
3
7 1
2
5
10


Sample output:
8

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int, input().split())
a = [0] * n
for i in range(n):
    a[i] = int(input())

eat = 0
for i in range(n):
    for k in range(10**7):
        if 1 + a[i] * k <= d:
            eat += 1
        else:
            break
        
print(x+eat)

Submission status: Accepted

Solution code:
n = int(input())
d ,x = map(int,input().split())
a = []
ans = x
for i in range(n):
  a.append(int(input()))
  ans += (d-1) // a[i]
  ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split())
A = []
for i in range(N):
    A.append(int(input()))

ans = 0
for i in range(N):
    day = 1
    while(1):
        if day > D:
            break
        day += A[i]
        ans += 1

ans += X
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
a = [0] * n
for i in range(n):
    a[i] = int(input())

ans = x
for aa in a:
    ans += (d-1)//aa+1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
a = list(int(input()) for _ in range(n))
ans = 0

for day in a:
    for i in range(d):
        if((day*i+1) <= d):
            ans += 1
print(ans+x)

Submission status: Accepted

Solution code:
a = input()
b, k = map(int,raw_input().split())
ap = 0
for i in range (a):
    flip = input()
    t = 0
    x = 1
    while x <= b:
        t += 1
        x += flip
    ap += t
print ap + k

Submission status: Accepted

Solution code:
import sys

n=int(input())
d,x=map(int,input().split())
a=[]
for i in range(n):
	a.append(int(input()))
sum=0

for j in range(n):
	for k in range(1,d+1,a[j]):
		sum+=1
sum+=x
print(sum)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
for i in range(n):
  a = int(input())
  b = 1
  while b <= d:
    x += 1
    b += a
print(x)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int, input().split())
l=[int(input()) for x in range(n)]
cnt=0
for i in range(n):
    choco=1
    for j in range(1,d+1):
        if choco<=d:
            choco+=l[i]
            cnt+=1
print(cnt+x)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
ans = 0
 
for _ in range(n):
  a = int(input())
  j = 0
  while True:
    if j*a + 1 <= d:
      ans += 1
      j += 1
      
    else:
      break
      
print(ans+x)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int, input().split())
ans = 0
for i in range(n):
    a = int(input())
    ans += 1 + (d-1)//a
    # print(1 + (d-1)//a)
print(ans + x)

Submission status: Accepted

Solution code:

import math

N=int(input())
D,X=map(int,input().split())
A=[int(input()) for _ in range(N)]
count=0
for i in range(N):
    count=count+math.floor((D-1)/A[i])+1
print(count+X)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
total = x
for i in range(n):
    a = int(input())
    i = 0
    while i*a + 1 <= d:
        total += 1
        i += 1
print(total)

Submission status: Accepted

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

X = 0
D = 0
N = 0

def countwhile(k):
    i=1
    while k(i):
        yield 1
        i += 1

def readlines():
    for _ in range(N):
        a = int(input())
        yield 1+sum(countwhile(lambda i: i*a+1 <= D))

def main():
    global N, X, D
    N = int(input())
    D, X = map(int, input().split())
    return sum(readlines()) + X
	
if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

X = 0
D = 0
N = 0

def loop():
    i=1
    a = int(input())
    while i*a+1 <= D:
        yield 1
        i += 1

def readlines():
    for _ in range(N):
        yield 1+sum(loop())

def main():
    global N, X, D
    N = int(input())
    D, X = map(int, input().split())
    return sum(readlines()) + X
	
if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

X = 0
D = 0

def loop():
    i=1
    a = int(input())
    while True:
        if i*a+1 <= D:
            yield 1
        else:
            break
        i += 1

def readlines():
    global X, D
    N = int(input())
    D, X = map(int, input().split())
    for _ in range(N):
        yield 1+sum(loop())

def main():
    return sum(readlines()) + X
	
if __name__ == "__main__":
    print(main())

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
a_L = []
for _ in range(n):
    a_L.append(int(input()))

choco = 0
for a in a_L:
    count_L = []
    for i in range(d):
        ans = a*i + 1
        if ans <= d:
            count_L.append(ans)
    #print(count_L)
    choco += len(count_L)

print(x+choco)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(input())
d,x = map(int,input().split())
a = [int(input()) for _ in range(n)]
print(x+n+sum([(d-1)//a[i] for i in range(n)]))

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
li = list()
for i in range(n):
    li.append(int(input()))
ans = 0

for i in range(1, d+1):
    if(i == 1):
        ans = ans + n
    else:
        for j in range(n):
            if li[j] == 1:
                ans = ans + 1
            else:
                if i >= (li[j] + 1) and i % (li[j]) == 1:
                    ans = ans + 1

print(ans + x)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
d -= 1
for i in range(n):
    x += 1 + d // int(input())
print(x)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
a = [int(input()) for _ in range(n)]

ans = 0
for i in range(n):
    ans += ((d-1) // a[i] + 1)

print(ans + x)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split())
ans = X

for i in range(N):
    A = int(input())
    for i in range(1,D+1):
        if (i-1) % A == 0:
            ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in range(N)]

ans = X

for a in A:
    ans += (D - 1) // a + 1

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
A = list(int(input()) for _ in range(n))

num = sum([1+(d-1)//a_i for a_i in A])

print(num+x)

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
a = [int(input()) for i in range(n)] 
ans=0
for i in a:
    day=1
    while day <= d:
        ans+=1
        day+=i
print(ans+x)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())

ans = 0
for _ in range(N):
    a = int(input())
    ans += (D - 1) // a + 1

ans += X
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
for _ in range(n):
  a=int(input())
  x+=(d-1)//a+1
print(x)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in range(N)]
print(X+N+sum((D-1)//a for a in A))

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int,input().split())
pList = []
for i in range(n):
  pList.append(int(input()))

result = 0
for i in pList:
  if d % i == 0:
    result += d//i
  else:
    result += d//i+1

print(result+x)

Submission status: Accepted

Solution code:


import numpy as np

n=int(input())
d,x=map(int,input().split())
for __ in range(n):
    a=int(input())
    x+=1+(d-1)//a
print(x)

Submission status: Accepted

Solution code:
n = int(input())
d,x= map(int,input().split())
A = [int(input()) for _ in range(n)]

ans = 0
for i in range(n):
  j = 1
  while j <= d:    
    ans += 1
    j += A[i]  
    
print(ans+x)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
a = []
for i in range(n):
    a.append(int(int(input())))

num = []
for i in range(n):
    num.append((d - 1) // a[i] + 1)
#print(num)

ans = x
for i in range(n):
    ans += num[i]
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
a = []
for i in range(n):
    a.append(int(int(input())))

num = []
for i in range(n):
    num.append(0)

for i in range(n):
    num[i] = (d - 1) // a[i] + 1
#print(num)

ans = x
for i in range(n):
    ans += num[i]
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
d, x = [int(i) for i in input().split()]
a = []
for i in range(n):
    a.append(int(input()))

total = x
for i in range(n):
    for j in range(1, d + 1):
        for h in range(d + 1):
            if h * a[i] + 1 == j:
                total += 1
print(total)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
lst1 = [int(input()) for i in range(n)]

ans = 0
for i in lst1:
    ans += 1
    ans += (d-1)//i

print(ans+x)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
As = [int(input()) for _ in range(N)]

s = 0
for i in range(N):
    n = 1
    eat_day = 1
    eat_cnt = 0
    while eat_day <= D:
        eat_cnt += 1
        eat_day = n * As[i] + 1
        n += 1
    s += eat_cnt

print(s + X)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
a = []
for i in range(n):
   a.append(int(input()))

d2 = [i for i in range(1, d+1)]
choco = x
for i in a:
   choco += len(d2[0::i])
print(choco)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
D,X = [int(i) for i in input().split()]
A = [0] * N
for i in range(N) :
    A[i] = int(input())
sum = X
for i in range(N) :
    count = 1
    day = 1
    while True :
        day += A[i]
        if day <= D :
            count+=1
        else :
            sum+=count
            break
print(sum)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
a = [int(input()) for i in range(n)]
ans = x
for i in range(n):
    ans += int((d - 1) / a[i]) + 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())

A = [int(input()) for _ in range(N)]
ans = [0]*(D+1)
for i in range(N):  
  day = 1
  cnt = 0
  while day <= D:
    ans[day] += 1
    cnt += 1
    day = cnt*A[i]+1
  
print(sum(ans)+X)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int,input().split())

ans = x
for i in range(n):

    ans += (d - 1) // int(input()) + 1
  
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
d, x=map(int,input().split())
a=[int(input()) for i in range(n)]
y=0  # 食べた数
for i in range(n):
  y+=1+(d-1)//a[i]
print(y+x)

Submission status: Accepted

Solution code:
#coding:utf-8
n = int(input())
d, x = map(int, input().split())
a = [int(input()) for _ in range(n)]

choco = 0

for i in range(0, n):
    tmp =  1 + (d - 1)//a[i]
    choco += tmp

print(choco+x)

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
choco=x
for i in range(n):
    a=int(input())
    day=1
    while(day<=d):
        choco+=1
        day+=a
print(choco)

Submission status: Accepted

Solution code:
n = int(input())
d,ans = map(int,input().split())
for _ in range(n):
  a = int(input())
  ans += len([a*i+1 for i in range(100) if a*i+1<=d])
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
a=[]
for i in range(n):
    a.append(int(input()))
s = 0
for i in range(n):
    day = 1
    while(day<=d):
        s += 1
        day += a[i]
print(s+x)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
a = list(int(input()) for _ in range(n))

m = 0
for i in range(n):
    m += (d-1)//a[i] +1
print(m + x)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int,input().split())
A = [ int(input())  for _ in range(N)]
ans = X
for a in A:
    for i in range(D):
        if a*i + 1 <= D:
            ans += 1
print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n=int(input())
d,x=map(int,input().split())

ans=0
for i in range(n):
    a=int(input())
    ans+=d//a+1
    if d%a==0:
        ans-=1
print(ans+x)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
D, X = [int(x) for x in input().rstrip().split()]
A = []
for _ in range(N):
    A.append(int(input()))
ans = 0
for i in range(N):
    day = 1
    ans += 1
    while True:
        day += A[i]
        if day <= D:
            ans += 1
        else:
            break
print(ans + X)

Submission status: Accepted

Solution code:
N = int(input())

D,X = map(int, input().split())

count = 0
for i in range(N):
    A = int(input())
    for d in range(D+1):
        temp = d*A+1
        if temp <= D:
            count = count + 1
print(X+count)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
ans = x
for i in range(n):
  a = int(input())
  ans += 1
  j = 1
  while a*j+1 <= d:
    ans += 1
    j += 1
print(ans)

Submission status: Accepted

Solution code:
# -coding: utf-8 -

n = int(input())
d, x = map (int, input().split())
a = ["" for _ in range(n)]
for i in range(n):
    a[i] = int(input())

def countit(a):
    c = 1
    n = 1
    while(True):
        if (n*a+1) <= d:
            c += 1
            n += 1
        else:
            break
    return c

ans = []
for i in a:
    ans.append(countit(i))

print(x + sum(ans))

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
cnt = 0
for i in range(n):
    a = int(input())
    j = 0
    while j * a + 1 <= d:
        cnt += 1
        j += 1

print(cnt + x)

Submission status: Accepted

Solution code:
N = int(input())
D, X  = map(int, input().split())

cnt = 0
for i in range(N):
    a = int(input())
    cnt += (D-1)//a + 1
print(cnt+X)

Submission status: Accepted

Solution code:
N = int(input())
D , X  = map(int,input().split())
li = list(int(input()) for i in range(N))
ans = N + X

for i in range(N):
    ans += (D-1)//li[i]

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int, input().split())
print(sum([len([x for x in range(1,D+1,int(input()))]) for _ in range(N)])+X)

Submission status: Accepted

Solution code:

n = int(input())
d,x = map(int,input().split())
a = []
for _ in range(n):
    a.append(int(input()))
c = 0

for i in range(n):
    t = 1
    while t <= d:
        c+= 1
        t+=a[i]

print(c+x)

Submission status: Accepted

Solution code:
n = int(input())
d, k = (map(int, input().split()))
a = [int(input()) for i in range(n)]
f = lambda x:(d-1)//x+1
y = list(map(f, a))
print(sum(y)+k)

Submission status: Accepted

Solution code:
def eat(a,d):
  days=2
  choco=1
  cnt=1
  flg=True
  while flg:
    days=cnt*a+1
    if days<=d:
      choco+=1
      cnt+=1
    else:
      flg=False
  return choco

n=int(input())
d,x=map(int,input().split())
sum=0
for i in range(n):
  a=int(input())
  sum+=eat(a,d)
print(sum+x)

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
c=0
for i in range(n):
    t=1
    a=int(input())
    while t<=d:
        c+=1
        t+=a

print(c+x)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
a = [int(input()) for i in range(n)]
ans = x

for i in range(n):
    c = 0
    while c*a[i]+1 <= d:
        ans += 1
        c += 1

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
a = []
for i in range(n):
    a.append(int(input()))
cnt = x

for i in range(n):

    if d-a[i] <= 0:
        cnt += 1
    else:
        cnt += (d-1)//a[i]+1

print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split())
result = X
for i in range(N):
  A = int(input())
  for j in range(1,D+1,A):
    result += 1 
print(result)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for i in range(N)]

sum = 0
for i in range(N):
        tmp = 1
        while tmp <= D:
                sum += 1
                tmp += A[i]
print(X + sum)

Submission status: Accepted

Solution code:
import sys
import numpy as np

I = np.array(sys.stdin.read().split(), dtype=np.int64)
n, d, x = I[:3]
a = I[3:]

def main():
    return x + np.sum((d - 1) // a + 1)

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

Solution code:
import sys
import numpy as np

I = np.array(sys.stdin.read().split(), dtype=np.int64)
n, d, x = I[:3]
a = I[3:]

def main():
    return x + np.sum((d + a - 1) // a)

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int,input().split())

for i in range(N):
	a = int(input())
	X += (D-1)//a + 1
print(X)

Submission status: Accepted

Solution code:

##Just for prctice
n=int(input())
d,x=map(int,input().split())
sum=0
for k in range(n):
    a=int(input())
    i=1
    while a*(i-1)+1<=d:
        sum+=1
        i+=1

print(sum+x)

"""
3
7 1
2
5
10

8

2
8 20
1
10

29

5
30 44
26
18
81
18
6

56
"""

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())

for _ in range(N):
    A = int(input())
    X += (D - 1) // A + 1
print(X)

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
ans=x
for i in range(n):
  ans+=(d-1)//int(input())+1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int, input().split())
A = [int(input()) for _ in range(N)]

ans = X
for a in A:
	for i in range(100):
		if i*a+1 > D:
			break
		ans += 1

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in range(N)]
l = []
for i in range(N):
  n = 0
  while (n + 1) * A[i] + 1 <= D:
    l.append((n + 1) * A[i] + 1)
    n += 1
  
print(len(l)+ N + X)

Submission status: Accepted

Solution code:
n=int(input())
d,x= (map(int, input().split()))
a = [list(map(int, input().split())) for i in range(n)]

choco=x
for i in range(n):
  choco+=1+((d-1)//a[i][0])
  
print(choco)

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
a=list(int(input()) for _ in range(n))
ans=0
for i in range(n):
    k=1
    while k*a[i]+1<=d:
            k +=1
    ans += k
print(ans+x)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int,input().split())
A = [int(input()) for i in range(N)]

ans = 0
for i in A:
  a = 1
  while a <= D:
    ans += 1
    a += i
    


print(ans + X)

Submission status: Accepted

Solution code:
import sys
n = int(input())
d,x = map(int, sys.stdin.readline().split())

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

sum = 0
for i in a:
    count = 0
    choco = 1
    while choco <= d:
        choco += i
        count += 1
    sum += count

print(x + sum)

Submission status: Accepted

Solution code:
N = int(input())
num = list(map(int, input().split()))
sum = 0
for i in range(N):
	for j in range(0,num[0],int(input())):
		sum+=1
print(sum+num[1])

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())

total = 0
for i in range(n):
    a = int(input())
    eat = (d-1) // a + 1
    total += eat

print(total + x)

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
ans=0
for i in range(n):
    ans+=((d-1)//int(input())+1)
print(ans+x)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
a = [int(input()) for _ in range(n)]

ans = 0
for i in range(n):
    if d % a[i] != 0:
        ans += d // a[i] + 1
    else:
        ans += d // a[i]
print(ans+x)

Submission status: Accepted

Solution code:
n = int(input())

d,x = [int(i) for i in input().split()]
li = []
t = x

def cou(ele,d): #ele=5 d=7
    e = 1
    c = 1
    
    while (e<d):
        
        e += ele   #e = 1+5=6
        if d>=e:
            c +=1
        
   
    #print(c)
    return c

for i in range(n):

    ele = int(input())
    
    c = cou(ele,d)
    t += c

    li.append(ele)


print(t)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for i in range(N)]
ans = 0
for a in A:
    ans += (D - 1) // a + 1
print(ans + X)

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
ans=0
for i in range(n):
    a=int(input())
    ans += (d-1)//a+1
print(ans+x)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
l = [int(input()) for _ in range(n)]
sum = 0
for i in range(n):
    day_i = 1
    while (day_i <= d):
        sum += 1
        day_i += l[i]
print(sum + x)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
a = [int(input()) for _ in range(n)]
ans = x
for i in range(n):
    for j in range(1, d + 1, a[i]):
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N=int(input())
Day,x=map(int,input().split())
baisu=[int(input()) for _ in range(N)]
total=x
k=0

for j in range(N):
  k=0
  while k*baisu[j]+1<=Day:
    total+=1
    k+=1
    
print(total)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
A = [int(input()) for _ in range(n)]
ans = 0
for i in range(n):
  cnt = 0
  for j in range(d):
    if A[i] * j + 1 <= d:
      ans += 1
    else:
      break
print(ans + x)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())
A = []
for _ in range(N):
  A.append(int(input()))

res = X
for a in A:
  res += 1
  res += (D - 1) // a

print(res)

Submission status: Accepted

Solution code:
N=int(input())
days,last=[int(s) for s in input().split()]
for i in range(N):
  x=1
  a=int(input())
  while x<=days:
    last+=1
    x+=a
print(last)

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
ans=x
for i in range(n):
    a=int(input())
    ans+=1+(d-1)//a
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
lst = [int(input()) for _ in range(n)]
mod = [(d - 1) // i + 1 for i in lst]

print(sum(mod) + x)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split())
ans = 0
for i in range(N):
  A = int(input())
  ans += (D-1)//A + 1
print(ans+X)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
ls_a = [int(input()) for _ in range(n)]

cnt = 0

for i in range(n):
    for j in range(101):
        if 1 + j * ls_a[i] <= d:
            cnt += 1
        else:
            break

print(cnt + x)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
A = []
for _ in range(n):
    A.append(int(input()))

ans = x
for n in range(n):
    ans += -(-d//A[n])

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
DX=list(map(int,input().split()))
D=DX[0]
X=DX[1]
A = [int(input()) for i in range(N)]
cnt=0
for j in range(len(A)):
    for k in range(D):
        if 1+A[j]*k>D:
            break;
        cnt=cnt+1

print(X+cnt)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
ans = x
for i in range(n):
    a = int(input())
    count = 0
    for i in range(100):
        if i * a + 1 <= d:
            count += 1
        else:
            break
    ans += count
print(ans)

Submission status: Accepted

Solution code:
#テストファイルで実行する時
import sys
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')

n = int(input())
d,x = map(int,input().split())
a=[int(input()) for i in range(n)]

choco = x

for i in range(n):
	j = 0
	while a[i]*j+1 <= d:
		#print(j,a[i]*j+1)
		j = j + 1
		choco = choco + 1

print(choco)

Submission status: Accepted

Solution code:
N = int(input())
D , X = map(int,input().split())
A = list(int(input()) for _ in range(N))

# 植木算的に2 ~ D日目のチョコレートを食べた日を加算し、最後に1を足す
D -= 1
ans = N
for a in A:
    ans += D // a
print(ans + X)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split())
A = list()
for i in range(N):
	A.append(int(input()))

chocolate = list()

for i in range(N):
	# print(i+1,'人目')
	choco_count = 0
	for j in range(1,D+1):
		day_count = 1 + A[i]*(j-1) 
		if day_count <= D:
			choco_count += 1 
		else:
			break
	# print('choco_count:',choco_count)
	chocolate.append(choco_count)
print(sum(chocolate)+X)

Submission status: Accepted

Solution code:
N = int(input())
d, x = map(int, input().split())

count = 0
for n in range(N):
    participant = int(input())
    count += len(list(range(0, d, participant)))

print(count+x)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int, input().split())

ans = X
for i in range(N):
  ans += (D-1)//int(input()) + 1
  
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d,x = map(int,input().split())
ans = n
for i in range(n):
    a = int(input())
    j = 1
    while a*j+1 <= d:
        # print(a*j+1,d)
        ans += 1
        j += 1
print(ans+x)

Submission status: Accepted

Solution code:
##### 解けた #####

N=int(input())
D,X=list(map(int,input().split(" ")))
c=0 # 何個食べられたか

# 各参加者について
for _ in range(N):
    c+=(1+(D-1)//int(input())) # 食べた数をインクリメント

print(X+c)

Submission status: Accepted

Solution code:
N=int(input())
D,X=map(int,input().split())
A=[]
for i in range(N):
  A.append(int(input()))
ans=0
count=0
for i in range(N):
  while count*A[i]+1<=D:
    if count*A[i]+1<=D:
      ans+=+1
      count+=1
  count=0
print(ans+X)

Submission status: Accepted

Solution code:
N =int(input())
D ,X = list(map(int, input().split()))
A = [int(input()) for i in range(N)]

ans = 0

for j in A:
    for k in range(0,100):
        if k * j +1 <=  D:
            ans +=1
print(ans + X)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int,input().split())
lst = []
cnt = 0
for i in range(N):
  lst.append(int(input()))
for i in lst:
  cnt += (D-1)//i
  cnt += 1
print(cnt + X)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split())
A = [int(input()) for _ in range(N)]
k = 0
for i in range(D):
  for j in range(N):
    if i*A[j] < D:
      k += 1
print(k + X)

Submission status: Accepted

Solution code:
n=int(input())
d,x=map(int,input().split())
for i in range(n):
    a=int(input())
    x+=(d-1)//a
x+=n
print(x)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
ans = x
for i in range(n):
  a = int(input())
  ans -= -d//a
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
ans = x
for i in range(n):
  a = int(input())
  ans += -(-d//a)
print(ans)

Submission status: Accepted

Solution code:
def examB():
    N = I()
    D, X = LI()
    A = [I() for _ in range(N)]
    cur = X
    for i in A:
        cur += (D-1)//i + 1
    print(cur)

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())

choco = X
for i in range(N):
    A = int(input())
    choco += (D-1) // A + 1
    
print(choco)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split())
li = [int(input()) for i in range(N)]
ans = 0
for i in range(N):
  ans += (D-1)//li[i] + 1
print(ans + X)

Submission status: Accepted

Solution code:
N = int(input())
D, X = list(map(int, input().split()))
for _ in range(N):
    X += (D-1)//int(input())+1
print(X)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int, input().split())

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

eat = 0

for i in range(D):
    for j in range(N):
        if i % A[j] == 0:
            eat += 1

print(eat + X)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
a = []
for _ in range(n) :
    a += [int(input())]
ans = 0
import math
for i in range(n) :
    ans += math.floor((d-1)/a[i]) + 1
ans += x
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
D, X = map(int,input().split())
A = [int(input()) for _ in range(N)]

ans = X

for a in A:
    for d in range(1, D+1, a):
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
D,X=map(int,input().split())
A=[]
for i in range(N):
  A.append(int(input()))
choko=X
for j in range(N):
  i=1
  while i<=D:
    choko+=1
    i+=A[j]
print(choko)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
a = [int(input()) for _ in range(n)]

cnt = x
for i in range(n):
	
	xx = 1
	while xx <= d:
		cnt += 1
		xx += a[i]
print (cnt)

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np
import math

n = int(stdin.readline().rstrip())

d,x = [int(x) for x in stdin.readline().rstrip().split()]

li = [int(stdin.readline().rstrip()) for _ in range(n)]

point = 0
for i in range(n):
    if li[i] <= d:
        point += math.ceil(d/li[i])
    else:
        point += 1
point += x
print(point)

Submission status: Accepted

Solution code:
N = int(input())
D,X = map(int,input().split())
L = []
for i in range(N):
    a = int(input())
    L.append(a)
ans = N + X
for i in L:
    cnt = 1
    while(True):
        A = cnt * i + 1
        if(A <= D):
            ans += 1
        else :
            break
        cnt += 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d, x = map(int, input().split())
ans = x
for i in range(n):
    a = int(input())
    ans = ans+(d-1)//a+1
    
print(ans)