import math x = int(input()) y = int(input()) l = int(input()) xmove = math.ceil(abs(x) / l) ymove = math.ceil(abs(y) / l) turn = 0 turn = turn + 1 if x != 0 else turn turn = turn + 1 if y < 0 else turn turn = turn + 1 if y < 0 and x == 0 else turn print(xmove + ymove + turn)