#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long r, x, y, x2, y2;
  cin >> r >> x >> y >> x2 >> y2;
  int distance = ceil(pow(pow(abs(x2 - x), 2) + pow(abs(y2 - y), 2), .5));
  cout << (distance - 1 + (2 * r)) / (2 * r) << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
