#include <bits/stdc++.h>
using namespace std;
int main() {
  long long r, x, y, x1, y1;
  cin >> r >> x >> y >> x1 >> y1;
  long double dist = sqrtl(pow(x1 - x, 2) + pow(y1 - y, 2));
  int t = 0;
  if (dist <= r) {
    t = 1;
  } else {
    if (r == 1) {
      t = floor(dist / r) - 1;
    } else {
      t = ceil(dist / r) - 1;
    }
  }
  int ans = max(t, 0);
  cout << ans << endl;
}
