try:
           l=list(map(int,input().split()))
           d=(l[3]-l[1])+(l[4]-l[2])
           m=d//(2*l[0])
           if(m*(2*l[0])!=d):
                      m=m+1
           print(m)
except:
           pass
