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