#include <bits/stdc++.h>
using namespace std;
int n, a[100005];
int gcd(int x, int y) {
  if (!y) return x;
  return gcd(y, x % y);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  int Gcd = a[2] - a[1];
  for (int i = 3; i <= n; i++) Gcd = gcd(Gcd, a[i] - a[i - 1]);
  printf("%d", (a[n] - a[1]) / Gcd - n + 1);
}
