import math
r,x1,y1,x2,y2=[int(x) for x in input().split()]
ans=0
diff=abs(abs(x1-x2)-abs(y1-y2))
mini=min(abs(x1-x2),abs(y1-y2))
ans+=int(math.ceil(diff/(2*r)))
ans+=int(math.ceil(mini/r))
print(ans)


