#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  long long int r, x1, y1, x2, y2;
  cin >> r >> x1 >> y1 >> x2 >> y2;
  long long int x = x1 - x2;
  long long int y = y1 - y2;
  r *= 2;
  long long int z = abs(x + y);
  cout << ceil((double)(z) / r) << endl;
}
