x = int(input()) y = int(input()) l = int(input()) ans = 0 + (y < 0) + (x != 0) y, x = abs(y), abs(x) ans += -(-y // l) + -(-x // l) print(ans)