def dis(x,x1,y,y1):
    return ((x-x1)**2 + (y-y1)**2)**0.5

import math
r,x,y,x1,y1=map(int,input().split())
if x==x1 and y==y1:
    print(0)
else:
    steps=0
    distance=dis(x,x1,y,y1)
    cos=abs(x-x1)/distance
    sin=abs(y-y1)/distance
    while distance>2*r:
            if x<x1:
                x=x+r*cos
            else:
                x=x-r*cos
            if y<y1:
                y=y+r*sin
            else:
                y=y-r*sin
            steps+=1
            distance=dis(x,x1,y,y1)
    if distance<2*r:
        print(steps)
    else:
        print(steps+1)