from math import sqrt
r,x,y,xd,yd = map(int,input().split())
dx = abs(x-xd)
dy = abs(y-yd)
ans = 0
while dx != 0 or dy != 0:
	l = sqrt(dx**2 + dy**2)
	ans += 1
	if l <= 2*r:
		dx = 0
		dy = 0
	else:
		dx -= (dx*2*r)//l
		dy -= (dy*2*r)//l
print(ans)
