#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, x, y, x1, y1, diff;
  cin >> r >> x >> y >> x1 >> y1;
  if (x == x1 && y == y1) {
    cout << "0\n";
  } else if (x == x1 && y != y1) {
    cout << abs(y - y1) / (2 * r) << endl;
  } else if (x != x1 && y == y1) {
    cout << abs(x - x1) / (2 * r) << endl;
  } else {
    diff = max(abs(x - x1), abs(y - y1));
    cout << diff / r << endl;
  }
  return 0;
}
