user_input=input()
numbers=user_input.split(' ')
move=0
r=int(numbers[0])
old_x=int(numbers[1])
old_y=int(numbers[2])
new_x=int(numbers[3])
new_y=int(numbers[4])
if new_x==old_x and new_y==old_y:
    move=0
else:
    distance=(new_x-old_x)^2 + (new_y-old_y)^2
    move=distance//r
    if distance%r!=0:
        move+=1

print(move)