#include <iostream>
using namespace std;
int main() {
long long A, B, C;
cin >> A >> B >> C;
long long result = B / C - (A - 1) / C;
cout << result << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKCmludCBtYWluKCkgewogICAgbG9uZyBsb25nIEEsIEIsIEM7CgogICAgY2luID4+IEEgPj4gQiA+PiBDOwogICAgCiAgICBsb25nIGxvbmcgcmVzdWx0ID0gQiAvIEMgLSAoQSAtIDEpIC8gQzsKCiAgICBjb3V0IDw8IHJlc3VsdCA8PCBlbmRsOwogICAgCiAgICByZXR1cm4gMDsKfQo=