#include <bits/stdc++.h>
const int N = 1e5;
int gcd(int a, int b) {
  int temp;
  while (b != 0) {
    a %= b;
    temp = a;
    a = b;
    b = temp;
  }
  return a;
}
void sortArray(int* aRr, int ind, int len) {
  if (len == 1) return;
  sortArray(aRr, ind, len / 2);
  sortArray(aRr, ind + len / 2, len - len / 2);
  int a = ind, b = ind + len / 2;
  int* pArr = (int*)malloc(len * sizeof(int));
  for (int i = 0; i < len; ++i) {
    if (aRr[a] < aRr[b]) {
      pArr[i] = aRr[a];
      ++a;
      if (a == ind + len || a == ind + len / 2) a = ind + len - 1;
    } else {
      pArr[i] = aRr[b];
      ++b;
      if (b == ind + len / 2 || b == ind + len) b = ind + len / 2 - 1;
    }
  }
  for (int i = 0; i < len; ++i) aRr[ind + i] = pArr[i];
  free(pArr);
}
int main() {
  int n;
  scanf("%d", &n);
  int x[N], d[N];
  for (int i = 0; i < n; ++i) {
    scanf("%d", x + i);
  }
  sortArray(x, 0, n);
  for (int i = 1; i < n; ++i) d[i - 1] = x[i] - x[i - 1];
  int g = d[0];
  for (int i = 1; i < n - 1; ++i) g = gcd(g, d[i]);
  int ans = 0;
  for (int i = 0; i < n - 1; ++i) ans += d[i] / g - 1;
  printf("%d", ans);
}
