X, Y, L = STDIN.readlines.map(&:to_i) count = 0 count += 1 if X != 0 count += 1 if Y < 0 count = 2 if X == 0 && Y < 0 x_go = (X.abs / L.to_f).ceil y_go = (Y.abs / L.to_f).ceil puts count + x_go + y_go