#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
void solve() {
  long long int r, a, c, x, y;
  cin >> r >> a >> c >> x >> y;
  if (a == x and c == y) {
    cout << 0;
    return;
  } else if ((x - a) * (x - a) + (y - c) * (y - c) - r * r < 0) {
    cout << 1;
    return;
  }
  {
    long long int turns = (abs(a - x) + abs(c - y)) / r;
    cout << turns / 2;
  }
}
int32_t main() { solve(); }
