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