


import sys



line1 = sys.stdin.readline().rstrip()

r, x1, y1, x2, y2 = map(int, line1.split())

sqdist = abs(x1-x2)**2 + abs(y1-y2)**2

if sqdist == 0:
	print 0
elif (2*r)**2 >= sqdist:
	print 1
else:
	movedabs = 2*r
	moved = movedabs**2
	moves = 1
	while moved < sqdist:
		movedabs += 2*r
		moved = movedabs**2
		moves += 1
	print moves
