import math

def dis(x,y,xx,yy):
    return math.sqrt((x-xx)**2+(y-yy)**2)

r,x,y,xx,yy = map(int,raw_input().split())

Dis = dis(x,y,xx,yy)

if Dis == 0:
    print 0
elif Dis >= 2*r:
    step = 0
    cnt = 0
    while cnt < Dis:
        cnt += 2*r
        step += 1
    print step
else:
    step = 1
    while math.sqrt((Dis/2.0)**2 + (step*2*r)**2) == int(math.sqrt((Dis/2.0)**2 + (step*2*r)**2)):
        step += 1
    print step * 2
