import java.util.Scanner;

public class codeforces {
	public static void solution(int rad, int x, int y, int x1, int y1) {
		int steps = (Math.abs(x1-x)+Math.abs(y1-y))/2/rad;
		System.out.println(steps);
	}
	
	public static void main(String args []) {
		Scanner obj = new Scanner(System.in);
		int r = obj.nextInt();
		int x = obj.nextInt();
		int y = obj.nextInt();
		int x1 = obj.nextInt();
		int y1 = obj.nextInt();
		solution(r,x,y,x1,y1);
	}
}