X = abs(int(input())) Y = int(input()) L = int(input()) count = 0 if Y < 0: count += 2 elif X != 0: count += 1 y = abs(Y) count += y // L if y % L == 0 else y//L + 1 count += X // L if X % L == 0 else X//L + 1 print(count)