var reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});

var args = [];

reader.on('line', function (input) {
  args.push(input);
});


reader.on('close', function () {
    var str = args[0].split(" ");
    var num = [];
    for(var i = 0; i < str.length; i++){
        num[i] = parseInt(str[i]);
    }
    var ans = num[1] / num[2] - num[0] / num[2];
    if(num[0] % num[2] === 0){
        ans++;
    }
    console.log(ans);
});
