#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long INF = 1e18;
const long long MAX = 100001;
void solve() {
  long long r, x, y, x1, y1;
  cin >> r >> x >> y >> x1 >> y1;
  if (x == x1) {
    long long ans = abs(y1 - y);
    cout << ans / (2 * r) << endl;
    return;
  }
  if (y == y1) {
    long long ans = abs(x1 - x);
    cout << ans / (2 * r) << endl;
    return;
  }
  double dis = (x1 - x) * (x1 - x) + (y1 - y) * (y1 - y);
  long long ans = ceil(sqrt(dis));
  long long res = ceil((double)ans / (2 * r));
  cout << res << endl;
  return;
}
int main(int argc, char const *argv[]) {
  solve();
  return 0;
}
