#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, x, y, x1, y1, h, h1, hx;
  cin >> r >> x >> y >> x1 >> y1;
  h = abs(x1 - x);
  h1 = abs(y1 - y);
  if ((h + h1) % (2 * r) != 0) {
    hx = (h + h1) / (2 * r) + 1;
  } else {
    hx = (h + h1) / (2 * r);
  }
  cout << hx << endl;
  return 0;
}
