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