from math import sqrt
input = input().split(' ')
r = int(input[0])
(x,y) = (abs(int(input[3])-int(input[1])),abs(int(input[4])-int(input[2])))
def f():
    global x,y
    a = sqrt((x ** 2 + y ** 2))
    if a<r:
        return 1
    elif 2*r>a>r:
        return 2
    else:
        n = a//(2*r)
        if n*2*r==a:
            return n
        else:
            if a-n*2*r<r:
                return n+1
            else:
                return n+2
print(f())
