#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j, k, l, m, x, y, x1, y1, r, n, t;
  scanf("%lld", &r);
  scanf("%lld", &x);
  scanf("%lld", &y);
  scanf("%lld", &x1);
  scanf("%lld", &y1);
  k = x - x1;
  l = y - y1;
  double dist = sqrt(pow(k, 2) + pow(l, 2));
  t = (dist / r);
  if (t <= 0)
    cout << "0" << endl;
  else if (t == 1)
    cout << "1" << endl;
  else
    cout << t - 1 << endl;
  return 0;
}
