

import java.util.Scanner;

public class AmrandPins {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int r = sc.nextInt();
		int x = sc.nextInt();
		int y = sc.nextInt();
		int xD = sc.nextInt();
		int yD = sc.nextInt();
		double D = Math.abs((xD-x))+Math.abs(yD-y);
		double ans = Math.ceil(D/(double)(2*r));
		System.out.print((int)ans);
	}

}
