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