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