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