#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, x, y, x2, y2;
  cin >> r >> x >> y >> x2 >> y2;
  x = abs(x - x2);
  x = x * x;
  y = abs(y - y2);
  y = y * y;
  int dist = sqrt(x + y);
  int res = 0;
  if (dist > 0) res = abs(dist - r);
  cout << res / r << endl;
}
