def zip_sorted(a,b):

	# sorted  by a
	a,b = zip(*sorted(zip(a,b)))
	# sorted by b
	sorted(zip(a, b), key=lambda x: x[1])

	return a,b

r,x,y,x1,y1 = [int(n1) for n1 in input().split()]

count = 0
diffx = abs(x1-x) 
diffy = abs(y1-y)

while (diffx>=2*r) or (diffy>=2*r):

	count = count + 1

	diffx = diffx - 2*r

	diffy = diffy - 2*r

while (diffx>=2*r): 

	count = count + 1

	diffx = diffx - 2*r

while (diffy>=2*r): 

	count = count + 1

	diffy = diffy - 2*r

if (diffy>0 or diffy>0) :

	count = count + 1

print(count)


'''
for i in range(n):
for j in range(n):
for k1 in range(len(a)):
for k2 in range(len(a)):
for k3 in range(len(a)):

'''