class AmrPins:
    def solve(self,radius,origx,origy,destx,desty):
        farther = max(destx,desty)
        start = min(origx,origy)
        diam = radius**2
        if (farther-start)/(1.0*diam)==0 and (farther-start)/(radius)>0:
            return (farther-start)/diam
        elif (farther-start)/(1.0*diam)!=0 and (farther-start)/(radius)>0:
            return ((farther-start)/diam)
        else:
            return 0
if __name__=="__main__":
    radius, origx, origy, destx, desty = map(int,raw_input().split(" "))
    ap = AmrPins()
    print ap.solve(radius,origx,origy,destx,desty)
