import strutils var x, y, l = parseInt readLine stdin cnt = 0 if y < 0: cnt.inc 2 if y != 0: cnt += y.abs.pred div l + 1 elif x != 0: inc cnt cnt += x.abs.pred div l + 1 echo cnt