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