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