from sys import stdin
debug = False

try:
    import os
    if os.environ['COMPUTERNAME'] == 'KRUEGER-PC':
        debug = True
except KeyError:
    pass


def debug_print(*foo):
    if debug:
        print(foo)

debug_print("debug active")


def print_array(res, size):
    if size:
        print(len(res))
    print(" ".join(map(str, res)))


def input_int_tuple():
    return tuple([x for x in map(int, stdin.readline().split())])


def input_int_array(size=True):
    if size:
        # read
        values = stdin.readline().split()
        assert(len(values) == 1)
    return [x for x in map(int, stdin.readline().split())]


def input_string():
    return stdin.readline().strip()


def count(x):
    return len(bin(x)) - 2


def problem():
  r, x, y, x2, y2  = input_int_tuple()

  D = (x2-x)**2 + (y2-y)**2
  import math
  ds= math.sqrt(D) 
  steps = max(0, int(ds / (r*2)) - 1)
  while (steps * r*2 )**2 < D:
      steps +=1
  
  print steps 
  
  


problem()


#print_array(problem(), False)

#xx = input_string()
