# coding: utf-8 import math x = int(input()) y = int(input()) l = int(input()) ans = 0 ans += math.ceil(abs(y)/l) if y > 0: if x != 0: ans += 1 elif y < 0: ans += 2 else: ans += 1 ans += math.ceil(abs(x)/l) if x == 0 and y == 0: ans = 0 print(ans)