#include <bits/stdc++.h>
using namespace std;
long long int Lpow(long long int a, long long int b) {
  long long int ans = 1;
  while (b > 0) {
    if (b % 2) ans = (ans * a);
    a = (a * a);
    b = b / 2;
  }
  return ans;
}
long long int gcd(long long int a, long long int b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr.begin(), arr.end());
  long long int gc = arr[1] - arr[0];
  for (int i = 1; i < n - 1; i++) gc = gcd(gc, arr[i + 1] - arr[i]);
  long long int ans = 0;
  for (int i = 0; i < n - 1; i++) {
    ans = ans + (arr[i + 1] - arr[i]) / gc - 1;
  }
  cout << ans << '\n';
  return 0;
}
