X, Y, L = [int(input()) for _ in range(3)] C = 0 if X == 0 and Y > 0: C += 0 elif X != 0 and Y > 0: C += 1 else: C += 2 C += -(-abs(X)//L) C += -(-abs(Y)//L) print(C)