#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, unsigned long long int y) {
  long long int temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else {
    if (y > 0)
      return x * temp * temp;
    else
      return (temp * temp) / x;
  }
}
bool comp(int a, int b) { return (a < b); }
int main() {
  double r, x, y, x1, y1;
  cin >> r >> x >> y >> x1 >> y1;
  double dist = abs(x1 - x) + abs(y1 - y);
  double c = dist / (2 * r);
  cout << ceil(c) << endl;
}
