#include <bits/stdc++.h>
using namespace std;
int main() {
  long long r, a, b, c, d;
  cin >> r >> a >> b >> c >> d;
  long double dis = sqrt((a - c) * (a - c) + (d - b) * (d - b));
  long long sum = dis / (r * 2);
  if (a == c && b == d)
    cout << 0;
  else if (dis < 2 * r)
    cout << 1;
  else if (sum * r * 2 == dis)
    cout << sum;
  else
    cout << sum + 1;
}
