# your code goes here
r, x, y, xx, yy = [int(x) for x in input().split()]
steps = 0
dis = (x - xx) ** 2 + (y - yy) ** 2

if int(dis % (4 * r * r)) != 0:
	steps += 1

steps += int(dis ** 0.5) // (2 * r)

print(steps)
