import math

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

dif1 = abs(x1-x2)
dif2 = abs(y1-y2)

resposta = int(math.ceil((dif1+dif2)/(2*r)))

if (dif1+dif2)%(2*r) != 0:
	resposta += 1

print resposta
