#include <bits/stdc++.h>
int main() {
  int r, n, m, k, l, ANS;
  double t, ans;
  while (~scanf("%d%d%d%d%d", &r, &n, &m, &k, &l)) {
    t = sqrt((n - k) * (n - k) * 1.0 + (m - l) * (m - l) * 1.0);
    ans = t / r * 1.0;
    ANS = (int)(ans + 0.5 + 1e-7);
    if (ans == 0)
      printf("%.lf\n", ans);
    else
      printf("%d\n", ANS - 1);
  }
}
