import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;



public class Main {
	
	public static long intSqrt(long l) {
		if (l<2) return l;
		
		long sq = 2;
		while (sq*sq<l) sq = sq*2;
		while (sq*sq>l) sq--;
		return sq;
	}
	
	public static long getDist(long steps, long r) {
		return (2*steps+1)*r + r;
	}
	
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);

		String[] num = in.readLine().split(" ");
		long r = Long.parseLong(num[0]);
		long x = Long.parseLong(num[1]);
		long y = Long.parseLong(num[2]);
		long x1 = Long.parseLong(num[3]);
		long y1 = Long.parseLong(num[4]);
		
		long dSquare = (x-x1)*(x-x1)+(y-y1)*(y-y1);
		//long d = intSqrt(dSquare);

		long steps=1;
		while (getDist(steps, r) * getDist(steps,r)<dSquare) {
			steps=steps*2;
		}
		while (getDist(steps, r) * getDist(steps,r)>dSquare) steps--;
		
		if ((x==x1 && y==y1)) out.println(0);
		else if (dSquare<=(2*r)*(2*r)) out.println(1);
		else {
			if (getDist(steps, r) * getDist(steps,r) <dSquare) steps+=2;
			else steps+=1;
			out.println(steps);
		}
		
		out.close();
	}
}	
