#include <bits/stdc++.h>
using namespace std;
const int maxN = 1e5 + 1;
const int mod = 1e9 + 7;
void solve() {
  int r, x, y, x1, y1;
  cin >> r >> x >> y >> x1 >> y1;
  long double d = (x - x1) * (x - x1) + (y - y1) * (y - y1);
  long double dist = sqrt(d);
  int ans = ceil(dist / (2 * r));
  if (dist <= r) ans = 2;
  if (dist == 0) ans = 0;
  cout << ans << "\n";
}
int main() {
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
