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