
n, b = map(int, input().split())
g = list(map(int, input().split()))

r = 0
t = 0
for i, each in enumerate(g):
    t += each % b
    r = each // b
    if i == len(g)-1 and each%b <= b:
        t += 1

print(t)