#include <bits/stdc++.h>
using namespace std;
const int maxN = 1e5 + 10;
int N, A[maxN];
int gcd(int x, int y) {
  if (x == 0) return y;
  return gcd(y % x, x);
}
int main() {
  cin >> N;
  for (int i = 0; i < N; i++) cin >> A[i];
  sort(A, A + N);
  int tmp = 0;
  for (int i = 0; i + 1 < N; i++) tmp = gcd(tmp, A[i + 1] - A[i]);
  int res = (A[N - 1] - A[0]) / tmp + 1 - N;
  cout << res;
}
