import math
r,x1,y1,x2,y2 = input().split(' ')
r = int(r)
x1 = int(x1)
x2 = int(x2)
y1 = int(y1)
y2 = int(y2)

distance = math.sqrt((x2-x1)**2+(y2-y1)**2)
ans = distance/r-1 
if(ans < 0):
    print(0)
else:
    print(math.floor(ans))
    