#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t r, x1, x2, y1, y2;
  cin >> r >> x1 >> y1 >> x2 >> y2;
  int64_t l = 0;
  l = abs(x1 - x2) + abs(y1 - y2);
  cout << l / (2 * r);
}
