#include <bits/stdc++.h>
using namespace std;
int main() {
  long long r, x1, y1, x2, y2;
  cin >> r >> x1 >> y1 >> x2 >> y2;
  long long s = abs(x1 - x2) * abs(x1 - x2) + abs(y1 - y2) * abs(y1 - y2);
  long long res = s / (r * r * 4);
  res = (long long)sqrt(res);
  if (res * res * (r * r * 4) != s) res++;
  cout << res;
  return 0;
}
