x = int(input()) y = int(input()) l = int(input()) ans = 0 if x != 0: ans += 1 if y < 0: ans += 1 print(ceil(abs(x) / l) + ceil(abs(y) / l) + ans)