#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int r, x, y, x1, y1, x2, y2;
  cin >> r >> x1 >> y1 >> x2 >> y2;
  x = x2 - x1;
  y = y2 - y1;
  double d = (sqrt(pow(x, 2)) + sqrt(pow(y, 2)));
  cout << (int)(ceil)(d / r / 2) << endl;
  return 0;
}
