import math x = int(input()) y = int(input()) l = int(input()) c = 0 if x != 0: c += 1 c += math.ceil(abs(x) / l) if y < 0: c += 1 c += math.ceil(abs(y) / l) print(c)