#include <bits/stdc++.h>
using namespace std;
int main() {
  int t = 1;
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  while (t--) {
    int r, x, y, x1, y1;
    cin >> r >> x >> y >> x1 >> y1;
    int sq = (x - x1) * (x - x1) + (y - y1) * (y - y1);
    if (round(sqrt(sq)) * round(sqrt(sq)) == sq) {
      int s = round(sqrt(sq));
      if (s % (2 * r))
        cout << (s / (2 * r)) + 1;
      else
        cout << (s / (2 * r));
    } else {
      int s = sqrt(sq);
      cout << (s / (2 * r)) + 1;
    }
  }
}
