import java.util.Scanner;
public class Problem5 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int r = scan.nextInt();
		int x = scan.nextInt();
		int y = scan.nextInt();
		int x1 = scan.nextInt();
		int y1 = scan.nextInt();
		
		System.out.println(Circle(r, x, y, x1, y1));		
	}
	
	public static int Circle(int r, int x, int y, int x1, int y1) {
		int steps = 0;
		
		while (x != x1 || y != y1) {
			
			if (x != x1) {
				x += r * r;
			}
			if (y != y1) {
				y += r * r;
			}
			steps++;
		}
		return steps;
	}
}