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