#include <bits/stdc++.h>
using namespace std;
int sqr(int x) { return x * x; }
int ABS(int x) { return (x < 0) ? x * (-1) : x; }
int main() {
  int r, x, y, x1, y1, ans;
  scanf("%d %d %d %d %d", &r, &x, &y, &x1, &y1);
  ans = max(ABS(x1 - x), ABS(y1 - y));
  printf("%d\n", ans / sqr(r));
  return 0;
}
