import math X = abs(int(input())) Y = int(input()) L = int(input()) cnt = 0 if Y >= 0: cnt += math.ceil(Y/L) if X > 0: cnt += math.ceil(X/L) + 1 elif X > 0: cnt += math.ceil(X/L) + 1 if Y < 0: cnt += math.ceil(abs(Y)/L) + 1 elif Y < 0: cnt += math.ceil(abs(Y)/L) + 2 print(int(cnt))