#include <bits/stdc++.h>
using namespace std;
const int N = 101000;
string s;
long long n, m, k;
vector<int> v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long r, x, y, x1, y1;
  cin >> r >> x >> y >> x1 >> y1;
  ;
  if (x == x1 && y == y1) {
    cout << 0 << endl;
    return 0;
  }
  long long dist = sqrt(pow(x - x1, 2) + pow(y - y1, 2));
  if (dist % r != 0) {
    cout << (dist / r);
  } else {
    cout << (dist / r) - 1 << endl;
  }
  return 0;
}
