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