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+2*r*cos
        else:
            x=x-2*r*cos
        if y<y1:
            y=y+2*r*sin
        else:
            y=y-2*r*sin
        steps+=1
        distance=dis(x,x1,y,y1)
    print(steps+1)