# -*- coding: utf-8 -*-
"""
Created on Fri Jun  5 12:39:16 2020

@author: Anmol Singla
"""

from math import sqrt
r,x,y,x1,y1=map(int,input().split())
if(x==x1 and y==y1):
    print(0)
else:
    a=(x-x1)**2
    b=(y-y1)**2
    c=sqrt(a+b)
    if(c<=2*r):
        print(1)
    else:
        d=(c-r)
        s=d/(2*r)
        if((d-(int(s)*2*r))<=r):
            print(int(s)+1)
        else:
            print(int(s)+2)
            
    
    