
import java.util.Scanner;

public class Main
{
    public static void main(String args[])throws Exception
    {
        Scanner sc=new Scanner(System.in);
        int r=sc.nextInt();
        int x1=sc.nextInt();
        int y1=sc.nextInt();
        int x2=sc.nextInt();
        int y2=sc.nextInt();
        double dis;
        dis=Math.sqrt((Math.pow((x1-x2),2) + Math.pow((y1-y2), 2)));
        dis=Math.ceil(dis);
        int d=(int )dis;
        r=2*r;
        int ans=0;
        int r1=d%r;
        ans= (d/r)+r1 ;
        System.out.print(ans);
    }
}