import math
r, x1, y1, x2, y2 = map(int, raw_input().split())

if x1 == x2 and y1 == y2:
    print 0
    quit()


def distance(x1, y1, x2, y2):
    return math.sqrt((x2 - x1)**2 + (y2 - y1)**2)

## where we want the edge so it goes to center can flip
d = distance(x1, y1, x2, y2) - r

if d < 0:
    print 1
    quit()

if x1 == y1 and x2 == y2:

    print int(d // r)
    quit()

print int(-(- d // r))