#include <bits/stdc++.h>
using namespace std;
const int MaxN = 1e6 + 5;
const int Mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const double esp = 1e-6;
int a[MaxN];
int n;
int ans, cnt;
inline int gcd(int a, int b) {
  if (a % b == 0)
    return b;
  else
    return (gcd(b, a % b));
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a + 1, a + 1 + n);
  int len = a[n] - a[1];
  int cnt = a[2] - a[1];
  for (int i = 3; i <= n; i++) {
    cnt = gcd(cnt, a[i] - a[i - 1]);
  }
  ans = len / cnt - n + 1;
  printf("%d\n", ans);
  return 0;
}
