#include <bits/stdc++.h>
using namespace std;
int main(void) {
  cout << sqrt(8);
  int r, x, y, x1, y1;
  cin >> r >> x >> y >> x1 >> y1;
  int length1 = max(x1, x) - min(x1, x);
  int length2 = max(y1, y) - min(y1, y);
  length1 = length1 * length1;
  length2 = length2 * length2;
  int k = sqrt(length1 + length2) - 1;
  if (k >= 0)
    cout << k / r << endl;
  else
    cout << 0 << endl;
}
