#include <bits/stdc++.h>
int main() {
  long long r, x1, y1, x2, y2;
  std::cin >> r >> x1 >> y1 >> x2 >> y2;
  long long res = floor(sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)));
  if (res % r == 0 && res > 0)
    std::cout << res / r - 1;
  else
    std::cout << res / r;
  return 0;
}
