#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, x, y, x2, y2;
  cin >> r >> x >> y >> x2 >> y2;
  double res = sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));
  int ans = 0;
  if (res == (int)res && (int)res % (2 * r) == 0) {
    cout << (int)res / (2 * r) << endl;
  } else {
    cout << (int)(abs(res - 2 * r)) / (2 * r) + 2 << endl;
  }
}
