#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int dif[maxn], x[maxn];
int gcd(int a, int b) { return b % a ? gcd(b % a, a) : a; }
int cmp(int a, int b) { return a < b; }
int main() {
  int n, i, now, t;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &x[i]);
  }
  sort(x, x + n, cmp);
  for (i = 0; i < n - 1; i++) {
    dif[i] = x[i + 1] - x[i];
  }
  sort(dif, dif + n - 1, cmp);
  for (now = dif[0], i = 0; i < n - 2; i++) {
    t = gcd(dif[i], dif[i + 1]);
    now = min(t, now);
  }
  printf("%d\n", (x[n - 1] - x[0]) / now - n + 1);
  return 0;
}
