#include <bits/stdc++.h>
using namespace std;
;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long d, r, x, y, a, b, c;
  c = 0;
  cin >> r >> x >> y >> a >> b;
  d = ((x - a) * (x - a) + (y - b) * (y - b) + 4 * r * r - 1) / (4 * r * r);
  while (c * c <= d && (c + 1) * (c + 1) <= d) c++;
  if (((x - a) * (x - a) + (y - b) * (y - b)) - c * (4 * r * r) > 0) c++;
  cout << c << '\n';
  cout.flush();
}
