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

ans = 0

while l <= r:

  if l%d == 0:

    ans += 1

  l += 1



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

ans = r//d - (l-1)//d

print(ans)
l, r, d = list(map(int, input().split()))
ans = 0
while l <= r:
    if l % d == 0:
        ans += 1
    l += 1
print(ans)

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

-ans = 0 -while l <= r: -    if l % d == 0: -        ans += 1 -    l += 1 +ans = r // d - (l - 1) // d