#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<queue>
#include<vector>
#include <string.h>
#include <math.h>
#include<map>
#include<string.h>
#define ll long long
int main()
{
    ll a,b,c;
    ll ans=0;
    scanf("%I64d %I64d %I64d",&a,&b,&c);
    int s1=a/c,s2=b/c;
    ans=s2-s1;
    if(a%c==0)
    {
        ans++;
    }
    printf("%I64d\n",ans);
    return 0;
}
