#include <bits/stdc++.h>
using namespace std;
bool check(long long s) {
  long long tmp = sqrt(s);
  if (tmp * tmp == s) return true;
  return false;
}
int main() {
  long long r, x, y, xp, yp, ans;
  cin >> r >> x >> y >> xp >> yp;
  long long res = (x - xp) * (x - xp) + (y - yp) * (y - yp);
  if (res % (r) * (r) == 0 && check(res / (r) * (r))) {
    long long tmp = sqrt(res) / r - 1;
    tmp = max(tmp, 0LL);
    cout << tmp;
    return 0;
  } else {
    long long k = (long long)(sqrt(res) / r);
    k = max(k, 0LL);
    cout << k;
  }
  return 0;
}
