import java.io.*;
import java.util.*;

public class xorfire {
	static void solve() throws IOException {
		int r, x, y, xx, yy;
		r = 2 * nextInt();
		x = nextInt();
		y = nextInt();
		xx = nextInt();
		yy = nextInt();
		if (x == xx && y == yy)
			out.println("0");
		else {
			long cur = (long)(x - xx) * (x - xx) + (long)(y - yy) * (y - yy);
			double dis = Math.sqrt(cur);
			int dis_cast = (int)dis;
			if ((long)dis_cast * dis_cast != cur) dis_cast += 1;
			out.println((dis_cast + r - 1) / r);
		}
	}

	static BufferedReader br;
	static StringTokenizer st;
	static PrintWriter out;

	public static void main(String[] args) throws IOException {
		InputStream input = System.in;
		PrintStream output = System.out;
		br = new BufferedReader(new InputStreamReader(input));
		out = new PrintWriter(output);
		solve();
		out.close();
		br.close();
	}

	static boolean hasNext() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			String line = br.readLine();
			if (line == null) {
				return false;
			}
			st = new StringTokenizer(line);
		}
		return true;
	}

	static String next() throws IOException {
		return hasNext() ? st.nextToken() : null;
	}

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

	static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

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