import java.io.*;
import java.util.*;
import java.util.Map.Entry;

public class B {

	void run() throws IOException {
		long r = ni() * 2, sx = ni(), sy = ni(), fx = ni(), fy = ni();

		long dx = fx - sx, dy = fy - sy;

		long d = dx * dx + dy * dy;

		long a = 0, c = 1;

		while (c * c * r * r <= d) {
			c *= 2;
		}

		while (c - a > 1) {
			long b = (a + c) / 2;

			if (b * b * r * r < d) {
				a = b;
			} else {
				c = b;
			}
		}

		if (a * a * r * r >= d) {
			c = a;
		}

		pw.println(c);

	}

	void skip() throws IOException {
		while (br.ready()) {
			br.readLine();
		}
	}

	void println(Iterable<Integer> q) {
		for (Integer x : q) {
			pw.print(x + " ");
		}
		pw.println();
	}

	int[] na(int a_len) throws IOException {
		int[] _a = new int[a_len];
		for (int i = 0; i < a_len; i++)
			_a[i] = ni();
		return _a;
	}

	String next() throws IOException {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	int ni() throws IOException {
		return Integer.parseInt(next());
	}

	long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	String nl() throws IOException {
		return br.readLine();
	}

	void tr(String debug) {
		if (!OJ)
			pw.println(" " + debug);
	}

	static PrintWriter pw;
	static BufferedReader br;
	static StringTokenizer st;
	static boolean OJ;

	public static void main(String[] args) throws IOException {
		long timeout = System.currentTimeMillis();
		OJ = System.getProperty("ONLINE_JUDGE") != null;
		pw = new PrintWriter(System.out);
		br = new BufferedReader(OJ ? new InputStreamReader(System.in) : new FileReader(new File("B.txt")));

		while (br.ready())
			new B().run();
		if (!OJ) {
			pw.println("----------------");
			pw.println(System.currentTimeMillis() - timeout);
		}
		br.close();
		pw.close();
	}

}