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