#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-5;
const int inf = 1e+9;
const long long N = 1e+5 + 189;
const int mod = 1e+9 + 7;
int a1, a2, b1, b2, r;
double s;
int main() {
  srand(time(NULL));
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> r;
  cin >> a1 >> b1 >> a2 >> b2;
  if (a1 == a2 && b1 == b2) return cout << 0, 0;
  s = sqrt((a1 - a2) * (a1 - a2) + (b1 - b2) * (b1 - b2));
  s = (int)(s);
  cout << s / r - 1;
  return 0;
}
