import math

def distance(x, y, x1, y1):
    return ((x - x1)**2 + (y - y1)**2)**0.5


a = list(map(int, input().split(" ")))
r = a[0]
x, y = a[1], a[2]
x1, y1 = a[3], a[4]
dist = distance(x, y, x1, y1) / r**2
if dist == 0:
    print(0)
else:
    print(math.ceil(dist) - math.ceil(distance(x, y, 0, 0)))