import java.util.Scanner;
public class B507{
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);

		double r, x, y, x1, y1;
		r = scan.nextInt();
		x = scan.nextInt();
		y = scan.nextInt();
		x1 = scan.nextInt();
		y1 = scan.nextInt();
		
		if(x == x1 && y == y1){
			System.out.println("0");
			System.exit(0);
		}
		double d = Math.sqrt(Math.pow(x-x1, 2) + Math.pow(y-y1, 2));
		if(d < r){
			System.out.println("2");
			System.exit(0);
		}
		int a = (int)(d/r)-1;
		System.out.println(a);
	}
}
