import math x = int(input()) y = int(input()) l = int(input()) if x == 0 and y > 0: p = 0 elif x == 0 and y == 0: p = 0 elif y > 0: p = 1 elif y < 0: p = 2 elif y == 0: p = 1 cnt = math.ceil(abs(x)/l) + math.ceil(abs(y)/l) + p print(cnt)