raw=input()

raw=raw.split(" ")
raw=[int(x) for x in raw]
r=raw[0]
x=raw[1]
y=raw[2]
p=raw[3]
q=raw[4]

d= abs(p-x)
h= abs(q-y)
d=d+h
t=d/(2*r)
h=int(d/(2*r))
if t>h:
    print(h+1)
else:
    print(h)
