#include <bits/stdc++.h>
using namespace std;
int n, a[100010];
inline int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  int g = 0, ans = 0;
  for (int i = 1; i < n; i++) g = gcd(g, a[i + 1] - a[i]);
  for (int i = 1; i < n; i++) ans += (a[i + 1] - a[i]) / g - 1;
  cout << ans << endl;
  return 0;
}
