import math X, Y, L = [int(input()) for i in range(3)] moving = 0 if X > 0 and Y >= 0: moving = 1 elif X < 0 and Y >= 0: moving = 1 elif X < 0 and Y < 0: moving = 2 elif X > 0 and Y < 0: moving = 2 elif X == 0 and Y > 0: moving = 0 elif X == 0 and Y < 0: moving = 2 else: moving = 0 ans = int(moving + math.ceil((abs(X) + abs(Y)) / L)) print(ans)