#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, x, y, x1, y1;
  int a, b, c;
  cin >> r >> x >> y >> x1 >> y1;
  c = abs(y1 - y);
  b = abs(x1 - x);
  a = sqrt(pow(c, 2) + pow(b, 2));
  if ((x == 0 && x1 == 0) || (y == 0 && y1 == 0)) {
    if (a % (r * 2) == 0) {
      cout << a / (r * 2);
    } else {
      cout << (a / (r * 2)) + 1;
    }
  } else {
    cout << (a / (r * 2)) + 1;
  }
  return 0;
}
