#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d, e;
  cin >> a >> b >> c >> d >> e;
  long long o = (d - b) * (d - b);
  long long p = (e - c) * (e - c);
  long long x = o + p;
  float dis = sqrt(x);
  long long disi = sqrt(x);
  float k = dis - disi;
  long long cnt = dis / (2 * a) + ((k == 0 && disi % (2 * a) == 0) ? 0 : 1);
  cout << cnt;
  return 0;
}
