stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h> //Ithea Myse Valgulious

namespace chtholly{

typedef long long ll;

#define re0 register int

#define rec register char

#define rel register ll

#define gc getchar

#define pc putchar

#define p32 pc(' ')

#define pl puts("")

/*By Citrus*/

inline int read(){

  int x=0,f=1;char c=gc();

  for (;!isdigit(c);c=gc()) f^=c=='-';

  for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');

  return f?x:-x;

  }

template <typename mitsuha>

inline bool read(mitsuha &x){

  x=0;int f=1;char c=gc();

  for (;!isdigit(c)&&~c;c=gc()) f^=c=='-';

  if (!~c) return 0;

  for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');

  return x=f?x:-x,1;

  }

template <typename mitsuha>

inline int write(mitsuha x){

  if (!x) return 0&pc(48);

  if (x<0) x=-x,pc('-');

  int bit[20],i,p=0;

  for (;x;x/=10) bit[++p]=x%10;

  for (i=p;i;--i) pc(bit[i]+48);

  return 0;

  }

inline char fuhao(){

  char c=gc();

  for (;isspace(c);c=gc());

  return c;

  }

}using namespace chtholly;

using namespace std;

//const int mod=read();

const int mod=1e9+7;

ll l,r,k;



bool judge(ll x){

if (!x) return 1;

ll ans=r/x-l/x;

if (l%x==0) ans++;

write(ans),pl;

return ans>=k;

}



struct juzhen{

ll m[3][3];

void clearit(){

  memset(m,0,sizeof m);

  m[1][1]=m[2][2]=1;

  }

void clear(){memset(m,0,sizeof m);}

juzhen operator *(const juzhen &b) const{

  int i,j,k;

  juzhen ans;ans.clear();

  for (i=1;i<3;++i){

    for (j=1;j<3;++j){

      for (k=1;k<3;++k){

        ans.m[i][j]=(ans.m[i][j]+m[i][k]*b.m[k][j])%mod;

	    } 

	  }

    }return ans;

  }

};



juzhen operator ^(juzhen a,ll b){

juzhen c;c.clearit();

for (;b;b>>=1,a=a*a) if (b&1) c=c*a;

return c;

}



int main(){

//read(l),read(r),read(k);

//ll le=0,ri=1e15;

//for (;le<=ri;){

//  ll mid=le+ri>>1;

//  judge(mid)?le=mid+1:ri=mid-1;

//  }

//cout<<ri<<endl;

//juzhen tmp,ans;

//tmp.clear();

//tmp.m[1][1]=tmp.m[1][2]=tmp.m[2][1]=1;

//ans.clearit();

//tmp=tmp^(ri-1);

//write(((ans*tmp).m[1][1]+mod)%mod);

ll x;

read(l),read(r),read(x);

judge(x);

}

/*

gcd(F(a),F(b))=F(gcd(a,b));

*/

// Faster C++ solution for the same problem (measured speedup: 5.194401279038953x):
#include<cstdio>

#define ll long long

int main() {

    ll a,b,c;

    scanf("%lld%lld%lld",&a,&b,&c);

    printf("%lld\n",b/c-(a?(a-1)/c:-1));

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#include <iostream>

#include <math.h>



using namespace std;



int main()

{

    long long int x, y, n, a, b, ans;

    cin >> x >> y >> n;

    a=y/n;

    b=x/n;

    ans=a-b;

    if(x%n==0)

        ans+=1;

    cout << ans << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.243672580321287x):
#include<cstdio>

#define ll long long

int main() {

    ll a,b,c;

    scanf("%lld%lld%lld",&a,&b,&c);

    printf("%lld\n",b/c-(a?(a-1)/c:-1));

    return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

#define ll long long

int main()

{

	ll a,b,x,cnt=0;

	while(cin>>a>>b>>x){

	if(a%x==0)cnt=1;

	cout<<b/x-a/x+cnt<<endl;

   }

	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.244709664591478x):
#include<stdio.h>

#include<math.h>

int main()

{

	long long int a,b,x,c;

	scanf("%lld%lld%lld",&a,&b,&x);

	c=b/x-a/x;

	if(a%x!=0)

	printf("%lld\n",c);

	else printf("%lld\n",c+1);

	return 0;

	}
// Slower C++ solution:
#include<iostream>

#include<math.h>

using namespace std;

int main()

{

	long long a,b,x,ans,num;

	cin>>a>>b>>x;

    ans=b/x;

    num=a/x;

    if(a%x==0)

    ans+=1;

    cout<<ans-num<<endl;

    return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.24246660524743x):
#include<stdio.h>

#include<math.h>

int main()

{

	long long int a,b,x,c;

	scanf("%lld%lld%lld",&a,&b,&x);

	c=b/x-a/x;

	if(a%x!=0)

	printf("%lld\n",c);

	else printf("%lld\n",c+1);

	return 0;

	}
// Slower C++ solution:
#include <iostream>

#include<cmath>

using namespace std;

int main()

{

    long long a,b,c,count;

    cin>>a>>b>>c;

        count=b/c-a/c;

        if(a%c==0) cout<<count+1<<endl;

        else cout<<count<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.241437119032671x):
#include<stdio.h>

#include<math.h>

int main()

{

	long long int a,b,x,c;

	scanf("%lld%lld%lld",&a,&b,&x);

	c=b/x-a/x;

	if(a%x!=0)

	printf("%lld\n",c);

	else printf("%lld\n",c+1);

	return 0;

	}
// Slower C++ solution:
#include<iostream>

using namespace std;

#define ll long long

int main()

{

	ll a,b,x,cnt=0;

	while(cin>>a>>b>>x){

	if(a%x==0)cnt=1;

	cout<<b/x-a/x+cnt<<endl;

   }

	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.244994756426067x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include<iostream>

#include<math.h>

using namespace std;

int main()

{

	long long a,b,x,ans,num;

	cin>>a>>b>>x;

    ans=b/x;

    num=a/x;

    if(a%x==0)

    ans+=1;

    cout<<ans-num<<endl;

    return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.2427515751538385x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include <iostream>

#include<cmath>

using namespace std;

int main()

{

    long long a,b,c,count;

    cin>>a>>b>>c;

        count=b/c-a/c;

        if(a%c==0) cout<<count+1<<endl;

        else cout<<count<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.241722032978286x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

typedef long long LL;

int main(){

	LL a,b,x;

	while(cin>>a>>b>>x){

		cout<<b/x-a/x+(a%x?0:1)<<endl;

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.244957450253942x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



int main()

{

    long long a,b,x;

    while(cin>>a>>b>>x)

    {

        long long ans=(b/x)-(a/x);

        if(a%x==0)

        ans++;

        printf("%lld\n",ans);

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.189723562972584x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include<cstdio>

#include<string>

#include<cstring>

#include<iostream>

#include<algorithm>

using namespace std;



long long a,b,x;



int main()

{

	//fuckfuck

	cin>>a>>b>>x;

	long long ans=(b/x)-(a%x?a/x:a/x-1);

	printf("%lld\n",ans);

}

// Faster C++ solution for the same problem (measured speedup: 5.224122899654325x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include <cstdio>

#include <cstring>

#include <cmath>

#include <algorithm>

#include <iostream>

#include <sstream>

#include <queue>

#include <map>

#include <vector>

#include <set>

#include <cstdlib>

#include <stack>



using namespace std;



typedef long long LL;

typedef double db;

#define FAST ios::sync_with_stdio(false);

const int MaxN = 105;

int main()

{

	LL a ,b , c;

	LL x , y ,ans;

	cin >> a >> b >> c ;

	x = a / c;

	y = b / c;

	ans = y - x;

	if(a % c == 0)ans++;

	cout << ans << endl;

	return 0;

	}

// Faster C++ solution for the same problem (measured speedup: 5.242866454251595x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;

#define ll long long int



int main()

{

    ll a, b,x;



    scanf("%lld%lld %lld", &a, &b, &x);



    ll cnt1 = a/x;

    ll cnt2 = b/x;





    if(a%x==0) cout << cnt2-cnt1 + 1<<endl;

    else{

        cout << cnt2 - cnt1 <<endl;

    }



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.198619782653188x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

	long long  a,b,x,n;

	scanf("%lld %lld %lld" ,&a,&b,&x);

	n=(b/x) - (a/x);

    if(a%x == 0)

    ++n;

    printf("%lld\n",n);

}

// Faster C++ solution for the same problem (measured speedup: 5.177173900465339x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:


#include <iostream>

using namespace std;

int main()

{

long long a,b,x,count=0;

cin>>a>>b>>x;

if(a==0)

{ count=(b/x)+1;

}

else

{

count=(b/x)-(a-1)/x;

}

cout<<count;

return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.193865886033473x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main(){

    long long a,b,x,n;

    cin>>a>>b>>x;

    n=(b/x)-(a/x);

    if(a%x==0){

    ++n;

}

	cout<<n;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.233932544092629x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main(){

	

long long A,B,X,W;

scanf("%lld%lld%lld",&A,&B,&X);

if(A==0)

W=(B/X)+1;

else{



W=(B/X)-(A-1)/X;

}



cout<<W;

	

	

	

	

}

// Faster C++ solution for the same problem (measured speedup: 5.188095086643336x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main(){

long long x,y,z,cnt;

cin>>x>>y>>z;

if(x==0){

    cnt=(y/z)+1;

}

else{

    cnt=(y/z)-((x-1)/z);

}

cout<<cnt<<"\n";

}


// Faster C++ solution for the same problem (measured speedup: 5.246667869213073x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{



   long long a,b,x,r;

   cin>>a>>b>>x;

   if(a==0)

    r=(b/x)+1;

   else

    r=(b/x)-(a-1)/x;

    cout<<r;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.193865886033473x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std; 

int main()

{

long long a,b,x;

cin>>a>>b>>x;

if(a==0)

cout<<(b/x)+1;

else 

cout<<(b/x)-((a-1)/x);

}

// Faster C++ solution for the same problem (measured speedup: 5.193814218194933x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define ll long long int

#define ull unsigned long long int

#define pb push_back

#define faster ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

#define mem(ara,n) memset(ara,n,sizeof(ara))

#define memb(ara) memset(ara,false,sizeof(ara))

#define all(x) (x).begin(),(x).end()

#define fr freopen("input.txt","r",stdin);

#define fw freopen("output.txt","w",stdout);

const double PI  =3.141592653589793238463;





int main()

{

    faster;

    ll a,b,c,d,e,f=0,ans=0,sum=0,m,n,p,q,r,t,w,x,y,z;

    string s;

    cin>>a>>b>>x;

    if(a==0){

        ans=(b/x)+1;

    cout<<ans<<endl;

    }

    else{

        m=(b/x);

        n=(a-1)/x;

        ans=m-n;

        cout<<ans<<endl;

    }

    return 0;

}












// Faster C++ solution for the same problem (measured speedup: 5.310806544780765x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

#define     SZ  50500

#define     LIM 2500005

#define     pll pair<LL, LL>

#define     pb  push_back

#define     ff  first

#define     ss  second

#define     LL  long long





int main()

{

    //freopen("in.txt", "r", stdin);

    //freopen("out.txt", "w", stdout);

    LL a, b, n, cnt = 0;

    cin>>a>>b>>n;

    if (a%n == 0) ++cnt;



    cout<<((b/n) - (a/n) + cnt)<<endl;





    return 0;

}






// Faster C++ solution for the same problem (measured speedup: 5.242879862269199x):
#include<stdio.h>

int main()

{

    long long int a, b, x, c;

    scanf("%lld %lld %lld", &a, &b, &x);

    c=(b/x)-(a/x);

    if(a%x==0)

        c++;

    printf("%lld\n", c);

}
// Slower C++ solution:
#include<cstdio>

#include<iostream>

using namespace std;

int main()

{

    long long a,b,x;

    scanf("%lld%lld%lld",&a,&b,&x);

    long long s=b/x-a/x;

    if(a%x==0)s++;

    cout << s;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.1888461783235x):
#include<cstdio>

#define pritnf printf

#define scnaf scanf

#define retrun return

#define sizoef sizeof

#define inl inline

#define br break

#define con continue

#define mst(a,b) memset(a,b,sizeof(a))

#define fora(x,a,b) for(re nti (x)=(a);(x)<=(b);++(x))

#define forb(x,a,b) for(re nit (x)=(a);(x)>=(b);--(x))

#define foral(x,a,b) for(re ll (x)=(a);(x)<=(b);++(x))

#define forbl(x,a,b) for(re ll (x)=(a);(x)>=(b);--(x))

#define re register

#define stt struct

#define infa (0x3f3f3f3f)

#define infb (0x7fffffff)

#define infd (0x7f)

#define abss(x) ((x)>(0)?(x):(-1)*(x))

#define maxx(a,b) ((a)>(b)?(a):(b))

#define minn(a,b) ((a)<(b)?(a):(b))

#define in(a) freopen("D:/""/in"a".in","r",stdin)

#define out(a) freopen("D:/""/out"a".out","w",stdout)

typedef long long ll;

typedef int itn,nti,tin,tni,nit;

using namespace std;

const nit maxa=104;

const nit maxb=1e2;

const nit maxc=5;



ll f,t,m,ans=0;



tni main()

{

	scanf("%lld%lld%lld",&f,&t,&m);

	//

	if(f%m==0)

	{

		f=f/m;

	}

	else

	{

		f=f/m+1;

	}

	t=t/m;

	//

	printf("%lld\n",t-f+1);

	return 0;

}
// Slower C++ solution:
#include<cstdio>

#include<iostream>

using namespace std;

int main()

{

    long long a,b,x;

    scanf("%lld%lld%lld",&a,&b,&x);

    long long s=b/x-a/x;

    if(a%x==0)s++;

    cout << s;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.1888461783235x):
#include<cstdio>

#define pritnf printf

#define scnaf scanf

#define retrun return

#define sizoef sizeof

#define inl inline

#define br break

#define con continue

#define mst(a,b) memset(a,b,sizeof(a))

#define fora(x,a,b) for(re nti (x)=(a);(x)<=(b);++(x))

#define forb(x,a,b) for(re nit (x)=(a);(x)>=(b);--(x))

#define foral(x,a,b) for(re ll (x)=(a);(x)<=(b);++(x))

#define forbl(x,a,b) for(re ll (x)=(a);(x)>=(b);--(x))

#define re register

#define stt struct

#define infa (0x3f3f3f3f)

#define infb (0x7fffffff)

#define infd (0x7f)

#define abss(x) ((x)>(0)?(x):(-1)*(x))

#define maxx(a,b) ((a)>(b)?(a):(b))

#define minn(a,b) ((a)<(b)?(a):(b))

#define in(a) freopen("D:/""/in"a".in","r",stdin)

#define out(a) freopen("D:/""/out"a".out","w",stdout)

typedef long long ll;

typedef int itn,nti,tin,tni,nit;

using namespace std;

const nit maxa=104;

const nit maxb=1e2;

const nit maxc=5;



ll f,t,m,ans=0;



tni main()

{

    scanf("%lld%lld%lld",&f,&t,&m);

    //

    if(f%m==0)

    {

        f=f/m;

    }

    else

    {

        f=f/m+1;

    }

    t=t/m;

    //

    printf("%lld\n",t-f+1);

    return 0;

}
// Slower C++ solution:
#include<cstdio>

#include<iostream>

using namespace std;

int main()

{

    long long a,b,x;

    scanf("%lld%lld%lld",&a,&b,&x);

    long long s=b/x-a/x;

    if(a%x==0)s++;

    cout << s;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.199459904366197x):
#include<cstdio>

long long a,b,x;

long long s,e;

int main() {

	scanf("%lld%lld%lld",&a,&b,&x);

	if(a%x==0)s=a/x;

	else s=a/x+1;

	e=b/x;

	printf("%lld",e-s+1);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define int long long

using namespace std;

int a,b,x;

signed main()

{

    scanf("%lld%lld%lld",&a,&b,&x);

    printf("%lld",!(a%x)?b/x-a/x+1:b/x-a/x);

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.189725925176776x):
#include<cstdio>

long long a,b,x;

long long s,e;

int main() {

	scanf("%lld%lld%lld",&a,&b,&x);

	if(a%x==0)s=a/x;

	else s=a/x+1;

	e=b/x;

	printf("%lld",e-s+1);

	return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main(){

    long long a,b,x;

    cin>>a>>b>>x;

    long long n,m;

    if(a%x==0){

        n=a/x;

    }

    else{

        n=a/x+1;

    }

    m=b/x;

    cout<<m-n+1;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.246211839935008x):
#include<cstdio>

long long a,b,x;

long long s,e;

int main() {

	scanf("%lld%lld%lld",&a,&b,&x);

	if(a%x==0)s=a/x;

	else s=a/x+1;

	e=b/x;

	printf("%lld",e-s+1);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define int long long//防止NOIP2018PJT2惨案

using namespace std;

int a,b,x;

signed main()//singed=int

{

    scanf("%lld%lld%lld",&a,&b,&x);

    printf("%lld",!(a%x)?b/x-a/x+1:b/x-a/x);//压行,思路与楼下相同

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.189725925176776x):
#include<cstdio>

long long a,b,x;

long long s,e;

int main() {

	scanf("%lld%lld%lld",&a,&b,&x);

	if(a%x==0)s=a/x;

	else s=a/x+1;

	e=b/x;

	printf("%lld",e-s+1);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

long long a,b,x;

long long s,e;

int main()

{

    cin>>a>>b>>x;

    if(a%x==0)

        s=a/x;

    else

        s=a/x+1;

    e=b/x;

    cout<<e-s+1<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2539969146971295x):
#include<cstdio>

long long a,b,x;

long long s,e;

int main() {

	scanf("%lld%lld%lld",&a,&b,&x);

	if(a%x==0)s=a/x;

	else s=a/x+1;

	e=b/x;

	printf("%lld",e-s+1);

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include<iomanip>

#include<cstring>

#include<cstdio>

#include<cmath>

#include<algorithm>

#include<vector>

using namespace std;

long long n,m,k;

long long a=-1,b; 

int main() {

    cin>>n>>m>>k;

    if(n%k)a=n/k+1;

      else a=n/k;

    b=m/k;

	cout<<(b-a)+1<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.24482697636703x):
#include<cstdio>

long long a,b,x;

int main(){

	scanf("%lld %lld %lld",&a,&b,&x);

	printf("%lld\n",b/x-a/x+!(a%x));

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

long long a,b,x,c,d;

int main()

{

cin>>a>>b>>x;

if(a%x==0)c=a/x;

else c=a/x+1;

d=b/x;

cout<<d-c+1<<endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.244826406744479x):
#include<cstdio>

long long a,b,x;

int main(){

	scanf("%lld %lld %lld",&a,&b,&x);

	printf("%lld\n",b/x-a/x+!(a%x));

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

long long a,b,s,sum1,sum2,x;

long long i;

int main(){

    

    cin>>a>>b>>x;

        if(a%x==0)sum1=a/x; else sum1=a/x+1;

        sum2=b/x;

    cout<<sum2-sum1+1<<endl;

    return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.244537949884864x):
#include<cstdio>

long long a,b,x;

int main(){

	scanf("%lld %lld %lld",&a,&b,&x);

	printf("%lld\n",b/x-a/x+!(a%x));

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstdio>

#include<cstring>

#define ll long long

#define N 5010

using namespace std;



ll a,b,x;



int main()

{

	int i,j;

	cin>>a>>b>>x;

	cout<<b/x-a/x+(bool)(a%x==0);

	

}

// Faster C++ solution for the same problem (measured speedup: 5.194854061728913x):
#include<cstdio>

#include<cstring>

int main()

{

    long long a,b,x;

    scanf("%lld%lld%lld",&a,&b,&x);

    long long num=b/x-a/x;

    if(a%x==0)

        num++;

    printf("%lld\n",num);

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

#define endl '\n'

int  main(){

    std::ios::sync_with_stdio(false);

   cin.tie(0);

    ll a,b,x;

    cin>>a>>b>>x;

    a!=0?cout << b / x - (a - 1) / x << endl:cout << b / x + 1 << endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.312393591067139x):
#include<cstdio>

#include<cstring>

int main()

{

    long long a,b,x;

    scanf("%lld%lld%lld",&a,&b,&x);

    long long num=b/x-a/x;

    if(a%x==0)

        num++;

    printf("%lld\n",num);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<algorithm>

#include<cmath>

#include<cstring>

#include<cstdlib>

#include<ctime>

#include<cstdio>

#include<string>

//#include<string>

//#include<sstream>

using namespace std;



int main()

{

	long long a,b,c,num;

	scanf("%lld%lld%lld",&a,&b,&c);

	num=b/c-a/c;

	if(a%c==0) num++;

	printf("%lld\n",num);

}

// Faster C++ solution for the same problem (measured speedup: 5.178596545049732x):
#include<cstdio>

#include<cstring>

int main()

{

    long long a,b,x;

    scanf("%lld%lld%lld",&a,&b,&x);

    long long num=b/x-a/x;

    if(a%x==0)

        num++;

    printf("%lld\n",num);

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

//#include <iostream>

//#include <cstdio>



#define FOR(i, a, b) for(int i = a; i < b; i++)

#define REP(i, n) FOR(i, 0, n)

#define MOD 1000000007

#define INF 2000000000



typedef long long ll;

typedef unsigned long long ull;

//typedef Pair<int,int> P;



using namespace std;



int main(void){

	ll a, b, x;

	cin>>a>>b>>x;

	if(a==0){

		cout<<b/x+1<<endl;

		return 0;

	}

	cout<<b/x-(a - 1)/x<<endl;

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.250185745662248x):
#include <stdio.h>

int main(void){

  long long a, b, x; scanf("%lld %lld %lld", &a, &b, &x);

  if(a == 0) printf("%lld", b / x + 1);

  else printf("%lld", (b / x + 1) - ((a - 1) / x + 1));

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main(){

	long long a,b,x,n,m;

	cin>>a>>b>>x;

	if(a%x==0)

	n=a/x;

	else n=a/x+1;

	m=b/x;

	cout<<m-n+1<<endl;

	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.254993030598386x):
#include<cstdio>

long long a,b,x;

long long s,e;

int main()

{

    scanf("%lld%lld%lld",&a,&b,&x);

    if(a%x==0)

		s=a/x;

    else 

		s=a/x+1;

    e=b/x;

    printf("%lld",e-s+1);

    return 0;

}