#include <bits/stdc++.h>
using namespace std;
long long r, x, y, u, v, d, k;
int main() {
  scanf("%lld %lld %lld %lld %lld", &r, &x, &y, &u, &v);
  if (x == u && y == v) {
    printf("%d", 0);
    return 0;
  }
  d = (u - x) * (u - x) + (v - y) * (v - y);
  k = sqrt(d / (r * r));
  if (r * r < d)
    printf("%d", 2);
  else
    printf("%d", k - 1);
}
