import java.util.*;
public class Practice{
	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();

		double ans = 0;
		if(x1 == x2 && y1 == y2){
			ans = 0;
		} else if(x1 == 0 && x2 == 0){
			ans += Math.abs(y1 - y2) / (2*r);
		}else if(y1 == 0 && y2 == 0){
			ans += Math.abs(x1 - x2) / (2*r);
		}else{
			double d = Math.sqrt (Math.pow((x1 + x2),2) + Math.pow((y1 + y2), 2));
			ans += Math.floor(d/(2*r));
		}

		System.out.println((int)ans);

	}
}

