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