from math import ceil

r, x1, y1, x2, y2 = list(map(int, input().split()))

dist = ceil((abs(x1 - x2) ** 2 + abs(y1 - y2) ** 2) ** 0.5)
print(dist // (2 * r) + 1 - (2 * r - dist % (2 * r)) // (2 * r))