#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, m, n, p, sum = 0;
  cin >> p >> a >> b >> m >> n;
  long long q = pow(m - a, 2) + pow(n - b, 2);
  while (q > p) {
    q -= 4 * p * p;
    sum++;
  }
  if (q != 0) sum++;
  cout << sum;
  return 0;
}
