N = int(eval(input()))

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

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

choco = X

for i in range(N):

  for j in range(D):

    if(j*A[i]+1 <= D):

      choco += 1

print(choco)
N = int(eval(input()))

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

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

choco = X

for a in A: 

  d = 0

  x = 0

  while d*a+1 <= D:

    x += 1

    d += 1

  choco += x

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

N = int(eval(input()))
D, X = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(N)]
choco = X
for a in A:
    d = 0
    x = 0
    while d * a + 1 <= D:
        x += 1
        d += 1
    choco += x
print(choco)

-for i in range(N): -    for j in range(D): -        if j * A[i] + 1 <= D: -            choco += 1 +for a in A: +    d = 0 +    x = 0 +    while d * a + 1 <= D: +        x += 1 +        d += 1 +    choco += x