import math
line = map(int, raw_input().split())
r = line[0]
d = 2 * r
x1 = line[1]
y1 = line[2]
x2 = line[3]
y2 = line[4]
d2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)
a = int(round(math.sqrt(d2)))/d - 1
if (a < 0): print 0
else:
    while (a*a*d*d < d2): a += 1
    if (a*a*d*d == d2): print a
    else:
        a -= 1
        print a + 1
