#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.141592653589793238L;
int fac[2000005] = {0};
void factorial() {
  fac[0] = 1;
  fac[1] = 1;
  for (int i = 2; i < 200005; i++)
    fac[i] = ((i % 1000000007) * (fac[i - 1] % 1000000007)) % 1000000007;
}
int power(int n, int m) {
  int p = 1;
  if (m == 0) return 1;
  p = (power(n, m / 2) % 1000000007);
  p = (p % 1000000007 * p % 1000000007) % 1000000007;
  return (m & 1 ? ((p % 1000000007 * n % 1000000007) % 1000000007)
                : (p % 1000000007));
}
int ncr(int n, int r) {
  return ((fac[n] * power(fac[r], 1000000007 - 2)) % 1000000007 *
          power(fac[n - r], 1000000007 - 2)) %
         1000000007;
}
vector<pair<int, string>> v[100010];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int r, x, y, x1, y1;
  cin >> r >> x >> y >> x1 >> y1;
  int step = 0;
  int ans = ceil(hypot(x - x1, y - y1) / (r * 2));
  cout << ans << "\n";
  return 0;
}
