#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  long long r, a, b, c, d;
  cin >> r >> a >> b >> c >> d;
  long long x = (a - c) * (a - c);
  long long y = (b - d) * (b - d);
  long long z = x + y;
  double dist = sqrt(z);
  long long dia = 2 * r;
  double ans = dist / (double)dia;
  long long ansa = ans;
  dist -= ansa * dia;
  if (dist) ansa++;
  cout << ansa << endl;
  return 0;
}
