#include <bits/stdc++.h>
using namespace std;
double r, x, y, w, z;
long long sol;
int main() {
  double aux;
  cin.sync_with_stdio(false);
  cin >> r >> x >> y >> w >> z;
  aux = abs(x - w) + abs(y - z);
  r *= 2;
  sol = aux / r;
  aux -= 1.0 * sol * r;
  if (aux > 0) sol++;
  cout << sol << "\n";
  return 0;
}
