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):
n = int(input())
d, x = map(int, input().split())

for i in range(n):
    day = 1
    c = int(input())
    while day <= d:
        x += 1
        day += c

print(x)

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

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

print(total + x)

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

Solution (Python):
def choco(a, d):
	return (d - 1) / a + 1

n = int(raw_input())
inpt = map(int, raw_input().split())
ans = inpt[1]

for i in range(0, n):
	a = int(raw_input())
	ans = ans + choco(a, inpt[0])

print ans

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

for i in range(d):
  for j in range(n):
    if i%a[j]==0:
      x+=1

print(x)

Solution (Python):
def get_next_int():
    return int(float(input()))


def get_next_ints(delim=" "):
    return tuple([int(float(x)) for x in input().split(delim)])


def get_next_str():
    return input()


def get_next_strs(delim=" "):
    return tuple(input().split(delim))


def get_next_by_types(*value_types, delim=" "):
    return tuple([t(x) for t, x in zip(value_types, input().split(delim))])


def solve():
    N = get_next_int()
    D, X = get_next_ints()
    choco = X + N
    for i in range(N):
        A = get_next_int()
        choco += int((D - 1) / A)
    print(choco)
solve()

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

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

eat = []


for i in range(N):
    cnt = 0
    eat.append(0)
    while True:
        day = cnt * A[i] + 1
        if day > D: break
        eat[i] = eat[i] + 1
        cnt = cnt + 1
print(sum(eat) + X)

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

list1 = list(map(int, input().split()))
D = list1[0]
X = list1[1]

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

print(ans + X + N)

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

print(sum(nums) + X)

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

choco = int(X)
for day in range(int(D)):
    for Ai in A:
        if day % Ai == 0:
            choco = choco + 1

print(choco)

Solution (Python):



import math

n = int(input())
d, x = list(map(int, input().split()))
a = []
sum = 0

for i in range(n):
    z = int(input())
    shou = math.floor(d / z)
    
    if z != 1:
        shou += 1
        if d % z == 0:
            shou -= 1
    sum += shou
    

print(sum + x)

Solution (Python):
def main():
    n = int(input())
    d, x = [int(c) for c in input().split()]
    ls = [int(input()) for i in range(n)]

    print(sum(map(lambda a: (d - 1) // a + 1, ls)) + x)

if __name__ == '__main__':
    main()

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

Solution (Python):
import math

people_count = int(input())
day_count_and_leave_count = input()
day_count = int(day_count_and_leave_count.split()[0])
leave_count = int(day_count_and_leave_count.split()[1])
interval_date_list=[]
for x in range(0,people_count):
	interval_date_list.append(int(input()))

choco_count = 0
for interval_date in interval_date_list:
	choco_count += 1
	choco_count += math.floor((day_count - 1) / interval_date)
choco_count += leave_count
print(choco_count)

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

ans=int(0)

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

print(ans+x+n)

Solution (Python):



import sys

N = int(sys.stdin.readline())
IN = sys.stdin.readline().split(' ')

D = int(IN[0])
X = int(IN[1])

X2 = N

for i in range(N):
	A = int(sys.stdin.readline())
	X2 += int((D - 1) / A)

print(str(X2 + X))

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

ans = 0

for i in a:
  for j in range(1, D+1, i):
    ans += 1

print(ans+X)

Solution (Python):
N = int(input())
D, X = (int(x) for x in input().split())
A = tuple(int(input()) for x in [None]*N)
sum = 0
for i in range(N):
 sum += 1 + (D - 1) // A[i]
print(sum + X)

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

print(res + int(X))

Solution (Python):
n = int(input())
nums = input().split(' ')
d, x = int(nums[0]), int(nums[1])

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

chocos = []
for itv in itvs:
    choco = int((d - 1) / itv) + 1
    chocos.append(choco)

print(sum(chocos) + x)

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

choco = 0

for i in range(N):
    cnt = 0
    a = 0
    while a * A[i] + 1 <= D:
        cnt = cnt + 1
        a = a + 1
    choco = choco + cnt
print(choco + X)

Solution (Python):
import sys

def _calc(Ai, j):
    if j != 0:
        return j * Ai + 1
    if j == 0:
        return 1

def main(inp_list):
    
     N = inp_list[0]
     D = inp_list[1][0]
     X = inp_list[1][1]
     A = inp_list[2:]
     
     results =[ _calc(per[0], i) for per in A  for i in range(0,100) if _calc(per[0], i) < D + 1]
     return len(list(results)) + X

def init(MODE):
    if MODE == 0:
        while True:
            try:
                result = int(input())
                yield result
            except:
                break

    if MODE == 1:
        while True:
            try:
                li=list(map(int,input().split()))
                yield li
            except:
                break
if __name__ == '__main__':
    """ MODE: 0 縦, 1 縦横, 2 横 """
    MODE = 1
    inp_list = init(MODE)
    print(main(list(inp_list)))

Solution (Python):
import numpy
import sys

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

x = X

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

print(x)

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

Solution (Python):
n = int(input())
D, X = list(map(int, input().split()))
a = [int(input()) for _ in range(n)]
r = 0
for i in range(n):
    k = 0
    while(k*a[i]+1 <= D):
        r += 1
        k += 1


print(r + X)

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

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

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

for i in range(N):
    for j in range(1,D+1):
        if (1+j*A[i]) <= D:
            C += 1

print(N+C+X)

Solution (Python):


N = int(input())

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

count = []
for i in range(N):
    cnt = 0
    for d in range(D):
        if A[i]*d + 1 <= D:
            cnt += 1
        else:
            break
    count.append(cnt)

print(sum(count) + X)

Solution (Python):


n = int(input())
d, x = [int(x) for x in input().split()]
count = 0
for i in range(n):
    num = int(input())
    for j in range(d):
        if num == 1:
            count += 1
        elif(j+1) % num == 1:
            count += 1
print(x + count)

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

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

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

ans = x

for i in range(n):
    a = int(input())
    b = 1
    while b <= d:
       ans += 1
       b += a

print(ans)

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

ans=x

for i in range(1,n+1):
    a=int(input())
    ans+=math.ceil(d/a)

print(round(ans))

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

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

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

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

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

cost = 0
for i in range(n):
    a = int(input())
    cost += d // a
    if d % a != 0:
        cost += 1

print(cost + x)

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


chocolate = 0
for i in list:	
	count = 0
	while(True):
		if count*i + 1 <= D:
			chocolate += 1
			count += 1
		else:
			break

print(chocolate+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())
A = [int(input()) for i in range(N)]
ans = X
for a in A:
    ans += D // a
    ans += int(D % a != 0)
print(ans)

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

Solution (Python):


n = int(raw_input())
d, x = map(int, raw_input().split())
ans = x
val = []
for i in range(n):
    val.append(int(raw_input()))

for i in val:
    for j in range(d):
        if (i*j + 1) <= d:
            ans = ans + 1
        else :
            continue

print ans

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

Solution (Python):
N = int(input())    
D, X = map(int, input().split())    
sum_c = 0           
for i in range(N):
    tmp = int(input())
    sum_c += int(D / tmp)
    if D%tmp != 0:
        sum_c += 1

print(sum_c + X)

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

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

Solution (Python):



import math

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

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()];

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

print(X);

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





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

print(X);

Solution (Python):
people = int(input())
days, left = [int(i) for i in input().split()]
eaten = 0
for i in range(people):
    a = int(input())
    eaten += (days-1) // a + 1

print(eaten + left)

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

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

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

print(X + sum([(D - 1) // int(input()) + 1 for _ in range(N)]))

Solution (Python):

if __name__ == "__main__":
    n = int(input())
    d, x = map(int, input().split())
    ans = 0
    factors = { dayNum:0 for dayNum in range(1, d+1) }
    for tmp in range(n):
        a = int(input())
        factors[1] += 1
        num = 1
        while num*a+1 <= d:
            factors[num*a+1] += 1
            num += 1
    for tmp in range(1, d+1):
        ans += factors[tmp]
    else:
        ans += x
        print(ans)

Solution (Python):


person = int(input())
days, final = map(int, input().split())
for i in range(person):
  eat_day = int(input())
  eat_time = ((days-1) // eat_day) + 1
  final += eat_time
print(final)

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

Solution (Python):


n=int(raw_input())
d,x=map(int,raw_input().split())
a=[]
for i in xrange(n):
 a.append(int(raw_input()))
s=[]
for i in xrange(n):
 y=d/a[i]+1
 if d%a[i]==0:
  y-=1
 s.append(y)
res=sum(s)+x
print res

Solution (Python):
n=int(input())
d,x=list(map(int, input().split()))
s=0
for i in range(n):
	a=int(input())
	ad=1
	while(ad<=d):
		s+=1
		ad+=a
print(s+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):
n = int(input())
d, x = map(int, input().split())

sum = x
for i in range(n):
    
    a = int(input())



    sum += (d - 1) // a + 1
print(sum)

Solution (Python):

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

chocos = [0]*D

for a in A:
    for i in range(0, D, a):
        chocos[i] += 1

print(sum(chocos) + X)

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

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

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

ans = X
for i, a in enumerate(A):
    y = (D - 1) // a + 1
    ans += y
print(ans)

Solution (Python):
import math

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

def solve():
    ans = X
    for A_i in A:
        ans += math.ceil(D/A_i)
    print(ans)

solve()

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

choco = 0
for days in range(N):
    Ai = A[days]
    eatDay = 1
    while eatDay <= D:
        choco += 1
        eatDay += Ai

print(choco + X)

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):
    ans += (D - 1) // A[i] + 1

print(ans + X)

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

Solution (Python):

import sys

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

sum_choco = 0

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

sum_choco += x

print (sum_choco)

Solution (Python):
N = int(input())
D,X = map(int,input().split(" "))
temp = 1
ans = 0 
for i in range(N):
    A = int(input())
    while temp <= D:
        ans += 1
        temp += A
    temp = 1
print(ans+X)

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

print(ans+x)

Solution (Python):
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.append(int(input())) 
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    n = I()
    d,x = LI()
    a = [I() for _ in range(n)]
    r = [0] * (d+1)
    r[0] = x
    for c in a:
        for i in range(1,d+1,c):
            r[i] += 1


    return sum(r)


print(main())

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

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

Solution (Python):



psn_cnt = int(input())


date_amari = input()

da_list = date_amari.split()
date = int(da_list[0])
amari = int(da_list[1])


psn_list = []
for i in range(psn_cnt):
	psn_list.append(int(input()))

choco_cnt_list = []

for i in range(psn_cnt):
	
	choco_cnt = 0
	
	for j in range(date + 1):
		
		if date >= psn_list[i] * j + 1:

			choco_cnt += 1
		
		else:
			choco_cnt_list.append(choco_cnt)

			break

choco_sum = 0
for choco_cnt in choco_cnt_list:
	choco_sum += choco_cnt
choco_sum += amari

print(choco_sum)

Solution (Python):
from sys import stdin
n = int(stdin.readline())
d,s = map(int,stdin.readline().split())
for _ in xrange(n):
 x = int(stdin.readline())
 st = 1
 while st <= d:
  s+=1
  st += x
print s

Solution (Python):

member = int(input())
days, choco = map(int, input().split())
ans = choco
 
for i in range(member):
    num = int(input())
    ans += (days - 1) // num + 1

 
print(ans)

Solution (Python):

member = int(input())
days, choco = map(int, input().split())
ans = choco

for i in range(member):
    num = int(input())
    if days % num == 0:
        ans -= 1
    ans += days // num + 1


print(ans)

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

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

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

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

print(r)

Solution (Python):
n = int(input())
day, choco = map(int,input().split())
P = [int(input()) for _ in range(n)]
ans = choco + n
for i in range(n):
    p = day // P[i]
    if day % P[i] == 0:
        p -= 1
    if p > 0:
        ans += p
print(ans)

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

B=0

choco=0
for y in range(N):
    for x in range(0,D,A[y]):
        choco=choco+1
        B=B+1

choco=choco+X

print(choco)

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

inp = list(map(int, input().split()))
D = int(inp[0])
X = int(inp[1])

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

ans = X

for i in range(D):
  j = 0
  while (j <= N - 1):
    
    if i == 0:
      ans += 1
    else:
      
      if i * A[j] + 1 <= D:
        ans += 1
        
    j += 1

print (ans)

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

a = [int(input()) for i in range(0, n)]

ans = x

for i in range(0, n):
    day = 1

    while day <= d:
        ans += 1
        day += a[i]


print(ans)

Solution (Python):



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

k = []
ans = X + N

for i in range(N):
    k.append(0)
    while 1:
        if 1 + k[i] * A[i] > D:
            k[i] -= 1
            break
        else:
            k[i] += 1
    ans += k[i]

print str(ans)

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

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

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

print(sum + N + X)

Solution (Python):
N = int(input())
DX = input().split(' ')
D,X = int(DX[0]),int(DX[1])

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

lis = []
for i in range(len(A)):
    x = 1
    while x <= D:
        lis.append(x)
        x += A[i]

print(len(lis)+X)

Solution (Python):
n = int(raw_input())
d,x= map(int, raw_input().split())
a = [int(raw_input()) for i in range(n)]
re = int()
for ai in a:
    for i in range(d):
        if (i*ai)+1 <= d:
            re+=1
print re+x

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

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

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

print(result)

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

for i in range(N):
	A_i = int(input())
	day = 1
	while(day <= D):
		day += A_i
		X += 1

print(X)

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

result = int(X)
temp_D  = int(D) - 1
for _ in range(N):
  A = int(input())
  result += math.floor(temp_D/A)
result += N

print(result)

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

for a in A:
    t = 0
    while (t*a + 1) <= D:
        C += 1
        t += 1

print(C+X)

Solution (Python):
n = int(input())
num = input().split()
a = [input() for i in range(n)]
ans = 0

for i in a:
    ran = (int(num[0])-1) // int(i)
    ans = ans + ran
ans = ans + n + int(num[1])
print(ans)

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

total = x
for i in a_l:
    for j in range(d):
        if j * i + 1 <= d:
            total += 1
print(total)

Solution (Python):
n = int(input())
nums = list(map(int, input().split()))
d, x = nums[0], nums[1]

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

num_choco = []
for i in range(n):
  nc = 0
  for j in range(d):
    if 1+a[i]*j <= d:
      nc += 1
    else:
      break
  num_choco.append(nc)
print(sum(num_choco)+x)

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

Solution (Python):
N = int(input())
DX = input().split()
D=int(DX[0])
X=int(DX[1])
a =[input() for i in range(N)]

sam = N + X
i= 1
n=0
while n < N:
    if 1 + i * int(a[n])  < D+1:
        sam += 1
        i += 1
    else:
        n += 1
        i = 1

print(sam)

Solution (Python):
N = int(input())
day, choco = [int(i) for i in input().split()]

for i in range(N):
    x = int(input())
    choco += day // x
    if day % x != 0:
        choco += 1

print(choco)

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) :
  ANS += (D - 1) // A[i] + 1
print(ANS)

Solution (Python):
n = int(input())
work = [int(x) for x in input().split()]
d = work[0]
x = work[1]
ans = 0
for i in range(n):
    ans += (d-1) // int(input()) + 1

print(ans + x)

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

Solution (Python):
import math

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

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

Solution (Python):

N = int(input())
day, x = map(int, input().split(' '))
duration_list = list(map(int, [input() for _ in range(N)]))
choco = [(day - 1) // i + 1 for i in duration_list]
print(x + sum(choco))

Solution (Python):
parsons = int(input())
days, remaining_ammount = list(map(int, input().split()))
terms = [int(input()) for i in range(parsons)]

ans = parsons

for i in terms:
    cnt = i
    while 1 + i <= days:
        if True:
            ans += 1
            i += cnt

print(ans + remaining_ammount)

Solution (Python):
try:
    n = int(input().strip())
    (d,x) = input().strip().split(" ")
    max = 0 
    for i in range(n):
        f = int(input().strip())
        for m in range(100):
            day=(m*f)+1
            if day > int(d):
                break
            max+=1        
    max+=int(x)
    print(max)
except EOFError:
    pass

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

Solution (Python):
a=int(input())
b,c=map(int,input().split())
d=0
while d<a:
  e=((b-1)//int(input()))+1
  c+=e
  d+=1
print(c)

Solution (Python):
N = int(input())
D, X = map(int, input().split())
A = []
for i in range(N):
    j = int(input())
    k = divmod(D-1,j)
    A.append(1 + k[0])

total = X + sum(A)
print(total)

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

for i in range(N):
    j = 0
    while j*A[i] + 1 <= D:
        j += 1
    else:
        fin = fin + j

print(fin + X)

Solution (Python):
from itertools import product
N = int(input())
D, X = map(int, input().split())

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

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

print(X + cnt)

Solution (Python):
def main():
    Num = int(input())
    Days, RemeinChoco = [int(i) for i in input().split()]
    
    A =[]
    for i in range(Num):
        A.append(int(input()))
    

    
    EatChocoNum = Num + RemeinChoco
    for i in range(Num):
        EatChocoNum += int((Days - 1)/A[i])
    
    print(EatChocoNum)
if __name__=="__main__":
    main()

Solution (Python):
member = int(input())
param = input().split()
day = int(param[0])
rest = int(param[1])

choco = []
for m in range(member):
    span = int(input())
    eat = 0
    for d in range(0,day,span):
        eat += 1

    choco.append(eat)


print(sum(choco, rest))

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

    ans.append(work)

print(sum(ans))

Solution (Python):
p = int(input())
dr = input().split(' ')
d, r = int(dr[0]), int(dr[1])


for i in range(p):
    nb = int(input())
    if nb == 1:
        r += d
    else:
        if d % nb == 0:
            r += d/nb
        else:
            r += (d//nb) +1

print(int(r))

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

print(X)

Solution (Python):
from sys import stdin


def main():
    N = int(stdin.readline().rstrip())
    D, X = [int(x)for x in stdin.readline().rstrip().split()]
    Ai = [int(stdin.readline().rstrip()) for _ in range(N)]
    spam = [[k for k in [Ai[i] * j + 1 for j in range(D)] if k <= D] for i in range(N)]
    ham = sum([len(x) for x in spam])
    print(ham + X)


if __name__ == '__main__':
    main()

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


sum = X
list = []



for i in range(N):
    eat = int(input())
    day = 1

    while True:
        if(day > D):
            break
        day += eat
        sum += 1


print(sum)

Solution (Python):
N = int(input())
DX = input().split()
A = [input() for i in range(N)]
D = int(DX[0])
X = int(DX[1])
A = [ int(x) for x in A]

ANS = [0 for i in range(N)]
for i in range(N):
    for j in range(D):
        if D >= (j * A[i] + 1):
            ANS[i] +=  1


ans = sum(ANS) + X        
print(ans)

Solution (Python):
n = int(input())
d, x = map(int, input().split())
a = []
s = 0

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

for i in range(1, d + 1):
    for j in range(n):
        if i % a[j] == 1 or a[j] == 1:
            s += 1
print(s + x)

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

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

S=0
  
for i in range(N):
  for j in range(1000):
    if (1+j*A[i])>D:
      S+=j
      break
  
print(S+X)

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

ans=x

for _ in range(n):
	i = int(input())						
	ans += ((d-1)//i) + 1

print(ans)

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

ans = 0

for t in range(1, d+1):
    for ai in a:
        if ai == 1:
            ans += 1
        elif t == 1 or t%ai==1:
            ans += 1
print(ans+x)

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

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

Solution (Python):
p = int(input())
data = list(map(int,input().split()))
al = data[1]
for i in range(p):
  k = int(input())
  if k < data[0] +1:
    al += ((data[0] - 1)// k + 1)
  else:
    al += 1
  k = 0
print(al)

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

result = X
for i in range(N):
    A = int(input())
    if A == 1:
        result += D
        continue
    if A < D:
        result += 1 + (D - 1) // A
        continue
    result += 1

print(result)

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

print(sum([(D - 1) // n + 1 for n in A]) + X)

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