#include <bits/stdc++.h>
using namespace std;
int main()
{
long a,b,x,dem,i;
cout<<"a="; cin>>a;
cout<<"b="; cin>>b;
cout<<"x="; cin>>x;
dem=0;
for (i=a; i<=b; i++)
if (i%x==0) dem++;
cout<<dem;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long n,m,x;
int main()
{cin>>n>>m>>x;
cout<<(m/x)-((n-1)/x);
}