import sys
from collections import *
from heapq import *
import math
import bisect
#def input():
    #return sys.stdin.readline()

r,x,y,x1,y1=map(int,input().split())
xm=abs(x-x1)
ym=abs(y-y1)
maxx=max(xm,ym)-min(xm,ym)
cnt=min(xm,ym)
cnt+=math.ceil(maxx/(2*r))
print(cnt)
