#include <bits/stdc++.h>
long long int a, b, c, d, e, f;
int m(long long int x) {
  if (x < 0)
    return -x;
  else
    return x;
}
int main() {
  scanf("%lld %lld %lld %lld %lld", &a, &b, &c, &d, &e);
  f = (m(d - b) * m(d - b) + m(e - c) * m(e - c)) / (4 * a * a);
  if ((m(d - b) * m(d - b) + m(e - c) * m(e - c)) == 4 * a * a * f)
    printf("%lld", (int)sqrt(f));
  if ((m(d - b) * m(d - b) + m(e - c) * m(e - c)) != 4 * a * a * f)
    printf("%lld", (int)sqrt(f) + 1);
}
