#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <iomanip>
#include <set>

using namespace std;



int main() {
	
	int r, x, y, a, b;

	cin >> r >> x >> y >> a >> b;

	if (a == x && b == y)
	{
		cout << 0 << endl;
		return 0;
	}

	else if (a == x)
	{
		if (abs(y-b)%(2*r) == 0)
		cout << abs(y - b) / (2 * r) << endl;

		else
			cout << abs(y - b) / (2 * r) + 1<< endl;
		return 0;
	}
	else if (b == y)
	{
		if (abs(x - a) % (2 * r) == 0)
			cout << abs(x - a) / (2 * r) << endl;

		else
			cout << abs(x - a) / (2 * r) + 1 << endl;
		return 0;
	}

	long long f = abs(a - x)*abs(b - y) + abs(b - y)*abs(b - y);
	double F = sqrt(f);
	int z = sqrt(f);

	if (F == z)
	{
		if (z % (2 * r) == 0)
			cout << z / (2 * r) << endl;

		else
			cout << z / (2 * r) + 1 << endl;
	}

	else
	{
		cout << z / (2 * r) + 1 << endl;
	}

	return 0;
}