import math

def Amr(r, x1,y1,x2,y2):
    val1=abs(x1-x2)
    val2=abs(y1-y2)
    dis=math.sqrt((val1**2)+(val2**2))
    if r!=1:
        if val1%r==0 and val2%r==0:
            res = int(dis / (r * 2))
        else:
            res = int(dis / (r * 2))+1
    else:
        if val1%r==0 and val2%r==0:
            res =int(dis/r)-1
        else:
            res=int(dis / r)
    return res


aux1, aux2, aux3, aux4, aux5 = input().split(' ')
r = int(aux1)
x1 = int(aux2)
y1 = int(aux3)
x2 = int(aux4)
y2 = int(aux5)

print(Amr(r, x1, y1, x2, y2))
