from math import *
s1=input()
s2=s1.split()
for i in range(5):
    s2[i]=int(s2[i])
r,x,y,x1,y1=s2[0],s2[1],s2[2],s2[3],s2[4]

dis=hypot((x-x1),(y-y1))


ans=0
if(y==y1 or x==x1):
    tmp=dis/(2*r)
    if(dis%(2*r)!=0):
        ans=int(tmp)+1
    else:
        ans=int(tmp)

else:
    slope=(y1-y)/(x1-x)
    theta = atan(slope)
    tmp=dis*(cos(theta))
    if(tmp!=int(tmp)):
        ans=int(tmp)+1
    else:
        ans=int(tmp)
    ans=ans//r

print(ans)


    
