r,x,y,x1,y1 = map(int,input().split())
dx = abs(x1-x)
dy = abs(y1-y)
d = (dx**2 + dy**2)*0.5
if(x==x1 and y==y1):
    print(0)
elif((x!=x1 or y!=y1) and d<r ):
    print(1)
elif((x!=x1 or y!=y1) and d==0):
    print(2)
elif(x!=x1 and y!=y1 and d>r):
    if(dx%(2*r)==0 and dy%(2*r)==0):
        print(dx//(2*r) + dy//(2*r) - 1)
    else:
        print(dx//(2*r) + dy//(2*r) + dx%(2*r) + dy%(2*r) -1)
elif(x!=x1 and y==y1 and d>r):
    if(dx%(2*r)==0 and dy%(2*r)==0):
        print(dx//(2*r) + dy//(2*r) )
    else:
        print(dx//(2*r) +  dx%(2*r) + 1)

elif(x==x1 and y!=y1 and d>r):
    if(dx%(2*r)==0 and dy%(2*r)==0):
        print(dx//(2*r) + dy//(2*r))
    else:
        print( 1 + dy//(2*r) + dy%(2*r))








    
