#include <bits/stdc++.h>
using namespace std;
int g[111];
int main() {
  int n, x, y, x1, y1;
  cin >> n >> x >> y >> x1 >> y1;
  int d = (int)sqrt((x1 - x) * (x1 - x) + (y1 - y) * (y1 - y));
  if (d == 0) {
    cout << 0;
    return 0;
  }
  if (d <= n) {
    cout << 1;
    return 0;
  }
  if (d % n == 0) {
    if (d % 2 == 0)
      cout << d / n - 1;
    else
      cout << d / n;
    return 0;
  }
  cout << d / n;
  return 0;
}
