#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d, e, t, r, i, j;
  cin >> r >> a >> b >> c >> d;
  a = abs(a - c);
  b = abs(b - d);
  e = sqrt(a * a + b * b);
  if (e == 0) {
    cout << e << endl;
    return 0;
  }
  e -= r;
  if (e > 0) {
    if (e % (r * 2) == 0)
      e = e / r;
    else
      e = 1 + (e / (r * 2));
  } else
    e = 1;
  cout << e << endl;
}
