import math distination_x = float(input()) distination_y = float(input()) distance = float(input()) turn = int(0) if distination_y >= 0 and distination_x >= 0: turn = math.ceil(distination_y / distance) + math.ceil(distination_x/distance) + 1 elif distination_y >= 0 and distination_x < 0: turn = math.ceil(distination_y/distance) + math.ceil(-1*distination_x/distance) + 1 elif distination_y < 0 and distination_x >= 0: turn = math.ceil(-1*distination_y/distance) +2 +math.ceil(distination_x/distance) +1 elif distination_y < 0 and distination_x < 0: turn = math.ceil(-1*distination_y/distance) +2 +math.ceil(distination_x/distance) +1 if distination_x == 0: turn = turn-1 print(turn)