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