    #Codeforces507B
import math
liszt = list(input().split())

d = math.pow((math.pow(int(liszt[3]) - int(liszt[1]), 2) + math.pow(int(liszt[4]) - int(liszt[2]), 2)), .5)

if d == 0 or d == int(liszt[0]):
    print(0)
elif d%int(liszt[0]) == 0:
    print(int(d/int(liszt[0])) - 1)
else:
    print(int(math.floor(d/int(liszt[0]))) - 1)
