import math
inp = list(map(int,raw_input().split()))
inp1 = list(inp)
raduis = inp1[0]
x = inp1[1]
y = inp1[2]
xd = inp1[3]
yd = inp1[4]
steps = 0
check1 = 0
check2 = 0
minsx = 0
check3 = 0
miniy = 0
if xd == x:
	steps = abs((yd - y) / (2.0*raduis))
	check1 = 1
	check3 = 1
	steps = math.ceil(steps)
	print steps
	pass
if yd == y and check3 == 0:
	steps = abs((xd - x)/ (2.0*raduis))
	check2 = 1
	steps = math.ceil(steps)
	print steps
	pass
if check1 == 0 and check2 == 0:
	m = (yd - y) / (xd - x)
	c = y - m * x
	if x > xd:
		minsx = 1
		pass
	if y > yd:
		miniy = 1
		pass
	XcenterSimulate = xd
	YcenterSimulate = yd
	deg = math.atan(m)
	cos = math.cos(deg)
	sin = math.sin(deg)
	if x > xd:
		mins = 1
		pass
	while abs(XcenterSimulate - x) > raduis and abs(YcenterSimulate - y) > raduis:
		steps = steps + 1
		if minsx == 1:
			XcenterSimulate = XcenterSimulate + raduis * 2 * cos
			pass
		else:
			XcenterSimulate = XcenterSimulate - raduis * 2 * cos
			pass
		if miniy == 1:
			YcenterSimulate = YcenterSimulate + raduis * 2 * sin
			pass
		else:
			YcenterSimulate = YcenterSimulate - raduis * 2 * sin
			pass
		pass
	print steps + 1
	pass


