import math
r, x1, y1, x2, y2 = map(int, raw_input().split())


def distance(x1, y1, x2, y2):
    return math.sqrt((x2 - x1)**2 + (y2 - y1)**2)


d = int(distance(x1, y1, x2, y2))

if d > 0:
    print (d - r) / r
else:
    print d 