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