#include <iostream>
using namespace std;
int main() {
long long int a,b,x,k;
cin >> a >> b >> x;
k =b/x - a/x;
if (!(a%x)) k++;
cout << k;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgICBsb25nIGxvbmcgaW50IGEsYix4LGs7CiAgICBjaW4gPj4gYSA+PiBiID4+IHg7CiAgICBrID1iL3ggLSBhL3g7CiAgICBpZiAoIShhJXgpKSBrKys7CiAgICBjb3V0IDw8IGs7CiAgICByZXR1cm4gMDsKfQ==