#include <bits/stdc++.h>
using namespace std;
int main() {
  float r, x1, y1, x2, y2;
  cin >> r >> x1 >> y1 >> x2 >> y2;
  float sum = abs(abs(x1) - abs(x2)) / (r * 2);
  sum += abs(abs(y1) - abs(y2)) / (r * 2);
  cout << sum;
  return 0;
}
