from math import sqrt
from math import ceil

rxyxdyd = input()
r, x, y, xd, yd = [int(i) for i in rxyxdyd.split(" ")]
dis = sqrt( (xd-x)**2 + (yd-y)**2 )
m = ceil(dis/r)
n = 0
if m == 0:
    print(0)
elif m <= r:
    print(1)
else:
    m -= r
    n += 1
    n += ceil(m / (2**r))
    print(n)
    
