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

print((len([i for i in range(L,R+1) if i % d == 0])))
L,R,d=list(map(int,input().split()));print((R//d-(L-1)//d))
L, R, d = list(map(int, input().split()))
print((len([i for i in range(L, R + 1) if i % d == 0])))

L, R, d = list(map(int, input().split()))
print((R // d - (L - 1) // d))

-print((len([i for i in range(L, R + 1) if i % d == 0]))) +print((R // d - (L - 1) // d))