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