#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, ax, ay;
  scanf("%d%d%d%d%d", &n, &x, &y, &ax, &ay);
  double asx = abs(ax - x), asy = abs(ay - y);
  int s = sqrt(asx * asx + asy * asy) + 0.5;
  printf("%d\n", (s - 1) / n);
  return 0;
}
