#include <bits/stdc++.h>
using namespace std;
int a[100005];
int b[100005];
int gcd(int a, int b) {
  if (!b) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (int i = 1; i < n; i++) {
    b[i] = a[i] - a[i - 1];
  }
  int cnt = a[n - 1] - a[0];
  for (int i = 1; i < n; i++) {
    b[i] = gcd(b[i], b[i - 1]);
  }
  cout << (cnt / b[n - 1]) - n + 1 << endl;
  return 0;
}
