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

Solution (Python):
import sys
fin = sys.stdin.readline

N = int(fin())
D, X = [int(elem) for elem in fin().split()]
A_list = [int(fin()) for _ in range(N)]

eaten_num_chocolate = 0
for A in A_list:
    eaten_num_chocolate += (D - 1) // A + 1

print(eaten_num_chocolate + X)

Solution (Python):
from math import ceil
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for i in range(N)]

ans = 0
for a in A:
    ans += ceil(D / a)
ans += X
print(ans)

Solution (Python):
N=int(input())
D,X=map(int,input().split())
a=[]
for _ in range(N):
    a.append(int(input()))
answer = 0
for v in a:
    day = 1
    while day <= D:
        answer += 1
        day += v
answer += X
print(answer)

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

Solution (Python):
"""
B - Chocolate
"""

n = int(input())

days, offset = map(int, input().split())

a_list = []
for part in range(n):
    a_list.append(int(input()))

choco_sum = offset

for day in range(days):
    for a in a_list:
        if day % a == 0:
            choco_sum += 1

print(choco_sum)

Solution (Python):
import sys
N = int(input())
D,X = map(int,input().split())
choco = 0
for i in range(N):
    a = int(input())
    k = 0
    while k*a+1 <= D:
        k += 1
        choco += 1
print(choco+X)

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

Solution (Python):



def main():
    n = int(input())
    d, x = map(int, input().split())
    count = x
    tmp = [1] * (d + 1)

    for i in range(1, n + 1):
        ai = int(input())
        count += sum(tmp[1::ai])

    print(count)


if __name__ == '__main__':
    main()

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

ans = x
for i in range(n):
    count = 1
    num = 1
    while num + a[i] <= d:
        count += 1
        num += a[i]
    ans += count

print(ans)

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

Solution (Python):
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
d,x = li()
a = []
for _ in range(n):
    a.append(ni())

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

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

ans = X
for a in A:
    for n in range(1,D+1,a):
        ans += 1
print(ans)

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

c = 0
for i in a:
    c += d//i + (d%i!=0)
print(c+x)

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

Solution (Python):
from sys import stdin

dic = dict()


def main() -> None:
    n = next_int()
    d, x = [int(s) for s in input().split()]

    for i in range(n):
        a = next_int()
        x += 1 + (d - 1) // a

    print(x)


def next_int() -> int:
    return int(next_str())


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

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

Solution (Python):
N = int(input())
D, X = map(int, input().split( ))
ans = X
for i in range(N):
	A = int(input())
	if D == A * (D//A):
		ans += D//A

	else:
		ans += D//A + 1 

print(ans)

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

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

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

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

Solution (Python):
N = int(input())
D, X = [int(i) for i in input().split()]
A = [int(input()) for _ in range(N)]
n = 0
for a in A:
    i = 1
    while i <= D:
        n += 1
        i += a
print(n+X)

Solution (Python):
n = int(input())
d,x = map(int, input().split())
for i in range(n):
    a = int(input())
    x += 1
    x += len([f for f in range(2,d+1) if (f-1) % a == 0])
print(x)

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

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

Solution (Python):

N = input()

D,X = input().split()
A = []
for i in range(int(N)):
    A.append(input())
x  = int(N)
for a in A:
    x += int((int(D)-1)/int(a))
    
print(x+int(X))

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
D = A[0]
X = A[1]

for i in range(N):
  M = int(input())
  X += int(D / M) + (0 if D % M == 0 else 1)

print(X)

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    N = int(input())
    D, X = li_input()
    A = [int(input()) for _ in range(N)]

    print(
        sum([math.ceil(D / a) for a in A]) + X
    )


main()

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    N = int(input())
    D, X = li_input()
    A = [int(input()) for _ in range(N)]

    e = sum([math.ceil(D / a) for a in A])

    print(e + X)


main()

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    N = int(input())
    D, X = li_input()
    A = [int(input()) for _ in range(N)]

    e = 0

    for a in A:
        e += math.ceil(D / a)

    print(e + X)


main()

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

d,x = map(int,input().split())

a = [(d-1)//int(input()) for _ in range(n)]

print(x + sum(a) + len(a))

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    N = int(input())
    D, X = li_input()

    eaten = 0

    for i in range(N):
        a = int(input())
        eaten += math.ceil(D / a)

    print(eaten + X)


main()

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

ans = x
for i in a:
    temp = 1
    while temp <= d:
        ans += 1
        temp += i

print(ans)

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

Solution (Python):
n = int(input())
d,x = map(int,input().split())
cnt = 0

for i in range(n):
    s = int(input())
    c = 1
    dcnt = 1
    while dcnt <=d :
        dcnt = c * s + 1
        cnt += 1
        c += 1

print(cnt + x)

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

print(x + sum([(d-1)//a_i+1 for a_i in a]))

Solution (Python):
N = int(input())
D,X = map(int, input().split())
C = 0

def Chocolate(A,D):
  b = 0
  i = 0
  while(True):
    date = i*A + 1
    if date > D:
      break
    else:
      b += 1
      i += 1
  
  return b

for n in range(N):
  A = int(input())
  C += Chocolate(A,D)
  
print(C+X)

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

cnt = 0
for a in A:
    for i in range(1, D+1, a):
        cnt += 1

print(cnt + X)

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

kosuu = []
for i in range(N):
    if D % A[i] == 0:
        kosuu.append(D // A[i])
    else:
        kosuu.append(D // A[i] + 1)
    
print(sum(kosuu) + X)

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

cnt=0

for i in range (n):
	a=int(input())
	cnt=cnt+1
	for j in range (1,d):
		if ((j*a)+1)<=d:
			cnt=cnt+1

		
			
    		
print(cnt+x)

Solution (Python):
n=int(input())
d,x=map(int,input().split())
a=[]
b=[]
for i in range(n):
    c=int(input())
    a.append(c)
for l in range(n):
    k=0
    for j in range(d+1):
        k=j*a[l]+1
        if k>d:
            break
    b.append(j)
print(sum(b)+x)

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

a = []

ans = 0

for i in range(n):
    a.append(int(input()))

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

ans += x

print(ans)

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

S = X

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

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

for a in A:
    for d in range(1, D+1):
        if d == 1:
            X += 1
        elif (d-1) % a == 0:
            X += 1

print(X)

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

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

Solution (Python):
n = int(input())
d, x = map(int, input().split())
num = 0
for i in range(n):
    a = int(input())
    for j in range(1, d + 1, a):
        num += 1
print(x+num)

Solution (Python):
n = int(input())
d, x = map(int, input().split())
a = [int(input()) for i in range(n)]
count = 0
for i in a:
    dd = d
    n = 0
    while True:
        if dd < n*i + 1:
            break
        n += 1
        count += 1

ans = count + x
print(ans)

Solution (Python):
n = int(input())
d,x = map(int, input().split())
count = 0
list_a = []
while count < n:
    list_a.append(int(input()))
    count += 1
ans = 0
for number in list_a:
    ans += (d - 1) // number + 1
print(ans + x)

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

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

print(total)

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

Solution (Python):
N = int(input())
D,X = map(int,input().split())
A = list([int(input()) for i in range(N)])
l = [(D-1)//A[i] for i in range(N)]
print(sum(l)+X+N)

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

ans = x
for v in a:
    tmp = 1
    while tmp <= d:
        ans += 1
        tmp += v

print(ans)

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

n_eaten = 0
for a_i in a_list:
    k = 0
    while k * a_i + 1 <= d:
        n_eaten += 1
        k += 1

print(n_eaten + x)

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

ans = X
for i in range(N):
    num = 1 + D // A_list[i]
    if D % A_list[i] == 0:
        num -= 1

    ans += num

print(ans)

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

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

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

Solution (Python):
import math
n = int(input())
d,x = map(int,input().split())
cou = x
for i in range(n):
  cou += math.ceil(d/int(input()))
print(int(cou))

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

index=0
while index<n:
    a = int(input())
    index2=0
    while True:
        if 1+a*index2<d+1:
            x+=1
            index2+=1
        else:
            break
    index+=1
print(x)

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

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

print(ans)

Solution (Python):
N = int(input())
D,X = map(int,input().split())
A = [int(input()) for i in range(N)]
L = []
for i in range(N):
  if (D % A[i] == 0):
    L.append(D//A[i])
  else:
    L.append((D//A[i])+1)
print(sum(L)+X)

Solution (Python):
N = int(input())
D, X = list(map(int, input().split()))
a = [int(input()) for i in range(N)]
num = [0 for i in a]
ans = X

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

for j in range(N):
    ans += num[j]

print(ans)

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

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

Solution (Python):
def AtCoder_B():
    N=input()
    D,X=input().split()
    Sum=0
    for i in range(int(N)):
        Sum+=int((int(D)-1)/int(input()))+1
    print(Sum+int(X))
    return

AtCoder_B()

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

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

print(ans)

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

N = inp()
D,X = inpl()
ans = 0
for i in range(N):
	a = inp()
	ans += (D-1)//a+1

print(ans+X)

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

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

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

ans = X

for i in range(1, D+1):
    for j in A:
        if j == 1:
            ans += 1
        elif i % j == 1:
            ans += 1

print(ans)

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

count = 0    
for i in range(N):
    count += (D-1) // A[i] + 1

print(X+count)

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

Solution (Python):
N = int(input())
D,X = map(int,input().split())
answer = X
for i in range(N) :
    a = int(input())
    answer += 1 + (D-1)//a
print(answer)

Solution (Python):

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

Solution (Python):
N=int(input())
D,X=(int(i) for i in input().split())
a=[int(input()) for i in range(N)]
for s in range(N):
	c=(D-1)//a[s]+1
	X+=c
print(X)

Solution (Python):
N=int(input())
D,X=(int(i) for i in input().split())
a=[int(input()) for i in range(N)]
goukei=X
for s in range(N):
	c=(D-1)//a[s]+1
	goukei+=c
print(goukei)

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

count = 0
for i in range(N):
    a = a_list[i]
    count += len([i +1 for i in range(D) if i % a == 0])
print(count + X)

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

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

print(x)

Solution (Python):
N = int(input())
D, X = map(int, input().split())
A = []
sum = 0

for i in range(N):
    A.append(int(input()))

for i in range(N):
    sum += int((D-1)/A[i])
    sum += 1
print(X + sum)

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

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

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

print(cnt + X)

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

ans = X

for i in range(N):
  A = int(input())
  ans += D // A + int(D%A>0)
  
print(ans)

Solution (Python):


from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


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

    ans = 0
    for i in range(N):
        a = A[i]
        for j in range(1000):
            if j * a + 1 <= D:
                ans += 1
    print(ans + X)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
D, X = map(int, input().split())
A = [int(input()) for i in range(N)]
ans = 0
for i in range(N):
    if(D % A[i]):
        ans += D // A[i] + 1
    else:
        ans += D // A[i]
print(ans + X)

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

print(X + sum((D-1)//A[i] + 1 for i in range(N)))

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(10000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]




dp = None


def main():
    N = int(input())
    D, X = li_input()

    eaten = 0

    for i in range(N):
        a = int(input())
        eaten += math.ceil(D / a)

    print(eaten + X)


main()

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

Solution (Python):
import math;
n=int(input())
d,x=map(int,input().split())
for i in range(n):x+=math.ceil(d/int(input()));
print(x)

Solution (Python):
answer = 0
N = int(input())
D,X = map(int,input().split())
for i in range(N) :
    a = int(input())
    for j in range(D) :
        if j*a + 1 <= D :
            answer += 1
        else :
            break
print(answer+X)

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

sum_c = 0
for _ in range(N):
    A = int(input())
    choco = 0
    for i in range(0, 100):
        day = i * A + 1
        if day > D:
            break
        choco += 1
    sum_c += choco
print(sum_c + X)