l, r, d = list(map(int, input().split()))

cnt = 0

for i in range(l, r + 1):

    if i % d == 0:

        cnt += 1

print(cnt)
l, r, d = list(map(int, input().split()))

l-=1

print((r // d - l // d))
l, r, d = list(map(int, input().split()))
cnt = 0
for i in range(l, r + 1):
    if i % d == 0:
        cnt += 1
print(cnt)

l, r, d = list(map(int, input().split()))
l -= 1
print((r // d - l // d))

-cnt = 0 -for i in range(l, r + 1): -    if i % d == 0: -        cnt += 1 -print(cnt) +l -= 1 +print((r // d - l // d))