#include<stdio.h>
int main()
{
    unsigned long long int a, b, x, count, i;
    while(scanf("%llu %llu %llu", &a, &b, &x)==3)
    {
        count = 0;
        for(i=a;i<=b;i++)
        {
            if(i%x==0)
                count++;
        }
        printf("%lld\n", count);

    }
    return 0;
}
