#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  if (!x) return y;
  return gcd(y % x, x);
}
int main() {
  int n;
  int i;
  int v[100000] = {0};
  int numbers = 0;
  int Min = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> v[i];
  }
  sort(v, v + n);
  Min = abs(v[1] - v[2]);
  for (i = 0; i < n - 1; i++) {
    Min = gcd(abs(v[i] - v[i + 1]), Min);
  }
  for (i = 0; i < n - 1; i++) {
    if (abs(v[i] - v[i + 1]) > Min) {
      numbers += abs(v[i] - v[i + 1]) / Min - 1;
    }
  }
  cout << numbers;
}
