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