x, y, l = [int(input()) for i in range(3)] counter = 0 if x == 0 and y >= 0: counter += 1 elif y >= 0: counter += 1 elif y < 0: counter += 2 x, y = abs(x), abs(y) if x != 0: counter += -(-x // l) if y != 0: counter += -(-y // l) print(counter)