a,b,c=map(int,input().split()) for i in range(c): d=(b-i+c)//c-(a+c-1-i)//c print(d)