r,x,y,x2,y2=map(int,input().split())
a=min(x,x2)
b=min(y,y2)
c=abs(max(x,x2)-a)
d=abs(max(y,y2)-b)
dis=pow((pow(x-x2,2) + pow(y-y2,2)),0.5)
if(dis%r==0):
    print(int(dis/(2*r)))
else:
    print(int(c/(2*r)+d/(2*r)))