#include <bits/stdc++.h>
using namespace std;
int main() {
  double r, x, y, xx, yy, d;
  cin >> r >> x >> y >> xx >> yy;
  d = sqrt(pow(xx - x, 2) + pow(yy - y, 2));
  if (d > (int)d) {
    r *= 2;
    d = (int)d + r;
  }
  cout << d / r;
  return 0;
}
