fun main(args: Array<String>) {
    val (from, to, k) = getInts()
    val r = (to / k) - (from - 1) / k
    println(r)
}

fun getInt() = readLine()!!.toInt()
fun getInts() = readLine()!!.split(" ").map { it.toInt() }