import math i=input X,Y,W = map(int,[i(),i(),i()]) cd = 0 if Y < 0: cd = 2 elif X != 0: cd = 1 print(cd + int(math.ceil(abs(X)/W)) + int(math.ceil(abs(Y)/W)))