import java.util.*;
public class CircleShift
{
	public static void main(String args[])
	{
		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();
		int distance = (int)(Math.sqrt(Math.pow(x1-x2,2)+Math.pow(y1-y2,2)));
		if(distance>0&&distance%r==0)
			System.out.println((int)(distance/r)-1);
		else if(distance>0)
			System.out.println((int)Math.ceil(distance/r));
		else
			System.out.println("0");
	}
}

