def main():

    a, b, x = list(map(int, input().split()))



    ans = b // x - a // x

    if a % x == 0:

        ans += 1

    print(ans)





if __name__ == "__main__":

    main()

def main():

    a, b, x = list(map(int, input().split()))



    ans = b // x - (a - 1) // x



    print(ans)





if __name__ == "__main__":

    main()

def main():
    a, b, x = list(map(int, input().split()))
    ans = b // x - a // x
    if a % x == 0:
        ans += 1
    print(ans)


if __name__ == "__main__":
    main()

def main():
    a, b, x = list(map(int, input().split()))
    ans = b // x - (a - 1) // x
    print(ans)


if __name__ == "__main__":
    main()

-    ans = b // x - a // x -    if a % x == 0: -        ans += 1 +    ans = b // x - (a - 1) // x