L, R, D = list(map(int, input().split()))

ans = 0

for i in range(L, R + 1):

    if i % D == 0:

        ans += 1



print(ans)



L, R, D = list(map(int, input().split()))



first = L + (D - (L % D)) % D

last = R - (R % D)

ans = 0

if L <= first <= R and L <= last <= R:

    ans = (last - first) // D + 1



print(ans)



L, R, D = list(map(int, input().split()))
ans = 0
for i in range(L, R + 1):
    if i % D == 0:
        ans += 1
print(ans)

L, R, D = list(map(int, input().split()))
first = L + (D - (L % D)) % D
last = R - (R % D)
ans = 0
if L <= first <= R and L <= last <= R:
    ans = (last - first) // D + 1
print(ans)

+first = L + (D - (L % D)) % D +last = R - (R % D) -for i in range(L, R + 1): -    if i % D == 0: -        ans += 1 +if L <= first <= R and L <= last <= R: +    ans = (last - first) // D + 1