import sys

def pyes_no(condition) :
  if condition :
    print "YES"
  else :
    print "NO"

def plist(a, s = ' ') :
  print s.join(map(str, a))

def rint() :
  return int(sys.stdin.readline())

def rints() :
  return map(int, sys.stdin.readline().split())

def rfield(n, m = None) :
  if m == None :
    m = n
  
  field = []
  for i in xrange(n) :
    chars = sys.stdin.readline().strip()
    assert(len(chars) == m)
    field.append(chars)
  return field

def digits(x, p) :
  digits = []
  while x > 0 :
    digits.append(x % p)
    x /= p
  return digits

r, x, y, x2, y2 = rints()
delta = (x - x2) ** 2 + (y - y2) ** 2

if delta == 0 :
  print 0
else :
  d = 2 * r
  n = (delta - 1) / (d ** 2) + 1
  n = int((n - 1) ** 0.5) + 1
  print n
