x = int(input()) y = int(input()) l = int(input()) xd = 0 yd = 0 act = 0 while xd < abs(x): xd += l act += 1 while yd < abs(y): yd += l act += 1 if x == 0 and y >= 0: pass elif y >= 0: act += 1 else: act += 2 print(act)