import math
string = input()
numbers = string.split(" ")
for x in range(5):
    numbers[x] = int(numbers[x])
r = numbers[0]
x1 = numbers[1]
y1 = numbers[2]
x2 = numbers[3]
y2 = numbers[4]
d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
print(math.ceil(math.ceil(d / r) / 2))