#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) + (s % (r * r * 4) == 0 ? 0 : 1);
  cout << res;
  return 0;
}
