#include <bits/stdc++.h>
using namespace std;
vector<long long int> prime;
unordered_set<long long int> stprime;
vector<long long int> sqr;
void sieve(long long int n) {
  bool p[n + 1];
  memset(p, true, sizeof(p));
  for (long long int i = 2; i * i <= n; i++) {
    if (p[i]) {
      for (int j = i * i; j <= n; j += i) {
        p[j] = false;
      }
    }
  }
  for (long long int i = 2; i <= n; i++) {
    if (p[i]) {
      prime.push_back(i);
      stprime.insert(i);
    }
  }
}
void solve() {
  long long int r, x, y, x1, y1;
  cin >> r >> x >> y >> x1 >> y1;
  long long int m = abs(x - x1) + abs(y - y1);
  m = ceil((long double)m / (long double)(2 * r));
  cout << m << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
