from math import * x, y, l = (int(input()) for _ in range(3)) ans = 2 if y < 0 else 1 if x != 0 else 0 print(ceil(abs(x) / l) + ceil(abs(y) / l) + ans)