#include <bits/stdc++.h>
using namespace std;
int r, x, y, a, b;
int ans;
void solve() {
  int d = (a - x) * (a - x) + (b - y) * (b - y);
  int t = sqrt(d);
  if (d && d < r * r) {
    cout << "2" << endl;
    return;
  }
  if (d && d == r * r) {
    cout << "1" << endl;
    return;
  }
  r += r;
  if (d && d < r * r) {
    cout << "2" << endl;
    return;
  }
  ans = t / r;
  r *= r;
  if (d % r) ans += 1;
  cout << ans << endl;
}
int main() {
  cin >> r >> x >> y >> a >> b;
  solve();
  return 0;
}
