import math X, Y, L = [ int(input()) for i in range(3) ] order = 0 if (Y,X) == (0,0): print(order) exit() if Y > 0 and X == 0: o_D = 0 else: if Y >= 0: o_D = 1 else: o_D = 2 if Y == 0: o_Y = 0 else: if abs(Y) > L: o_Y = math.ceil(abs(Y)/L) else: o_Y = 1 if X == 0: o_X = 0 else: if abs(X) > L: o_X = math.ceil(abs(X)/L) else: o_X = 1 print(o_D + o_Y + o_X)