def main(): x = int(input()) y = int(input()) l = int(input()) count = 0 if x < 0: count += 1 if y < 0: count += 1 distance = abs(x) + abs(y) if distance % l == 0: count = count + (distance // l) elif distance % l > 0: count = count + (distance // l) + 1 print(count) if __name__ == "__main__": main()