#include <bits/stdc++.h>
using namespace std;
long long r, a1, b1, a2, b2;
long long dis = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> r >> a1 >> b1 >> a2 >> b2;
  dis = ceil(sqrt((a2 - a1) * (a2 - a1) + (b2 - b1) * (b2 - b1)));
  cout << (dis + 2 * r - 1) / (2 * r) << endl;
  cout.flush();
  return 0;
}
