X = int(input()) Y = int(input()) L = int(input()) x_move = -(-abs(X)//L) y_move = -(-abs(Y)//L) move = x_move+y_move if Y >= 0: if X==0: print(move) else: print(move+1) exit() else: print(move+2)