import math

# Capture input
A = list(map(int, input().split()))
r = A[0]
x = A[1]
y = A[2]
x_prime = A[3]
y_prime = A[4]

# If both are same 0 since no moves are needed
if x == x_prime and y == y_prime:
    print(0)

else:
    # Calculate the distance between the two points
    distance = math.sqrt(pow((x - x_prime),2)+pow((y - y_prime),2))
    # if x_prime > y_prime:
      #  distance = abs(x_prime - x)
    #else:
      #  distance = abs(y_prime - y)

    # Removing radius
    distance -= r

    # Get the number of turns
    turns = distance/r

    print(int(turns))