#include <bits/stdc++.h>
using namespace std;
long long int v1, v0, j, x, y, f, g, h, i, k, l, n, o,
    p = 0, cnt1 = 0, cnt = 0, sum = 0, mini = 1, sum2 = 0, q = 0, dip, certi, m,
    maxi, maxi2 = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  float r, a, b, c, d, dist, t, div;
  cin >> r >> a >> b >> c >> d;
  dist = sqrt((c - a) * (c - a) + (d - b) * (d - b));
  t = (d - b) / (c - a);
  if ((1 / (sqrt(1 + (t * t)))) == 0 && dist != 0) {
    div = 2 * r;
  } else {
    div = (2 * r) / sqrt(1 + (t * t));
  }
  if (dist == 0) {
    cout << 0;
  } else {
    cout << ceil(dist / div);
  }
}
