import math x, y, l = [int(input()) for _ in range(3)] a = math.ceil(abs(x) / l) b = math.ceil(abs(y) / l) c = a + b if y >= 0: if x != 0: c += 1 else: c += 2 print(c)