stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#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));

*/

// Optimized solution to the same problem (faster):
#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;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

} 

// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

} 

// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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);

}

// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

	}

// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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);

}

// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):


#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;

}

// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

	

	

	

	

}

// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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";

}


// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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);

}

// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}












// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}






// Optimized solution to the same problem (faster):
#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);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

} 

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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);

	

}

// Optimized solution to the same problem (faster):
#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;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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);

}

// Optimized solution to the same problem (faster):
#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;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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));

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

} 

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main()

{long long a,b,x,s,n;

 cin>>a>>b>>x;

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

 else s=a/x+1;

 n=b/x;  

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

} 

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

long long a,b,x,ans,bns;

int main(){

    cin>>a>>b>>x;

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

    else ans=a/x+1;

    bns=b/x;

    cout<<bns-ans+1<<endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

long long a, b, x, 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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

using namespace std;

long long ans, a, b, x;

int main(){

    cin >> a >> b >> x;

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

    cout << ans << endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

long long a,b,x,s,t;

int main()

{

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

    if(a%x==0)

		s=a/x;

    else

		s=a/x+1;

    t=b/x;

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

    return 0;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream> 

long long a,b,x;

long long s,e;

int main(){

    std::cin>>a>>b>>x;

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

    else s=a/x+1;

    e=b/x;

    std::cout<<e-s+1;

	return 0;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    long long a,b,x,start,end;

	cin>>a>>b>>x;

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

    else start=a/x+1;

    end=b/x;

    cout<<end-start+1<<endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

long long a,b,x;

int main(){

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

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

    return 0;

}

// Fastest known solution for this problem: