extension String: CollectionType {
    func toInts() -> [Int] {
        return self.split(" ").map {Int($0)!}
    }
    
    func toUInts() -> [UInt64] {
        return self.split(" ").map {UInt64($0)!}
    }
    
    func toStrings() -> [String] {
        return self.split(" ")
    }
}

let values = readLine()!.toUInts()
let a = values[0]
let b = values[1]
let x = values[2]

let adjust: UInt64 = a % x == 0 ? 1 : 0

print((b - a) / x + adjust)