#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, x, y, x1, y1;
  cin >> r >> x >> y >> x1 >> y1;
  int d = (x1 - x) * (x1 - x) + (y1 - y) * (y1 - y);
  int move = 0;
  while (2 * r <= sqrt(d)) {
    move++;
    r = 2 * r;
  }
  if (r == sqrt(d) || d == 0)
    cout << move << endl;
  else if (r < sqrt(d)) {
    cout << move + 1 << endl;
  }
  return 0;
}
