#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int main() {
  int n = 0;
  std::cin >> n;
  if (n < 3 || n > 100000) return 1;
  std::vector<int> v;
  std::copy_n(std::istream_iterator<int>(std::cin), n, std::back_inserter(v));
  std::sort(v.begin(), v.end());
  std::vector<int> r(v.size() - 1);
  for (auto ivect = 0; ivect < v.size() - 1; ++ivect) {
    r[ivect] = v[ivect + 1] - v[ivect];
  }
  std::sort(r.begin(), r.end());
  int min_distance = r[0];
  int min_dist = min_distance;
  for (auto ivect = r.size() - 1; ivect > 0; --ivect) {
    min_dist = gcd(r[ivect], min_dist);
  }
  int points = 0;
  for (auto ivect = 0; ivect < r.size(); ++ivect) {
    points += r[ivect] / min_dist - 1;
  }
  std::cout << points;
  return 0;
}
