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