#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, a, b, c, d;
  cin >> r >> a >> b >> c >> d;
  double q = (double)sqrt(pow(a - c, 2) + pow(d - b, 2));
  q = q / 2 * r;
  cout << ceil(q);
  return 0;
}
