#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)9e18;
long long rec(long long i, long long j) {
  while (i != 0 && j != 0) {
    if (i > j) {
      i = i % j;
    } else
      j = j % i;
  }
  return (max(i, j));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> A(n);
  for (long long i = 0; i < n; i++) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  long long ans = inf;
  vector<long long> B(n - 1);
  for (long long i = 1; i < n; i++) {
    B[i - 1] = A[i] - A[i - 1];
  }
  vector<long long> dp(n - 1);
  dp[0] = B[0];
  for (long long i = 1; i < n - 1; i++) {
    dp[i] = rec(dp[i - 1], B[i]);
  }
  long long k = dp[dp.size() - 1];
  long long st = A[0];
  long long count = 0;
  for (long long i = 0; i < n; i++) {
    if (st > A[i]) continue;
    if (st == A[i]) {
      st += k;
      continue;
    }
    if (st < A[i]) {
      if ((A[i] - st) % k == 0) {
        if (A[i - 1] != st) count++;
        count += ((A[i] - st) / k);
        count--;
        st = A[i];
      } else {
        if (A[i - 1] != st) count++;
        count += (A[i] - st) / k;
        st += ((A[i] - st) / k) * k + k;
      }
    }
  }
  cout << count;
  return 0;
}
