#include<iostream>
using namespace std;
int main()
{
 unsigned long long  int a,b,x,i,c=0;
  cin>>a>>b>>x;
  for(i=x;i<=b;i=i+x)
  {
      if(i>=a)
      c++;
  }
 if(a==0)
    c++;

  cout<<c<<endl;
}

