module main; 
import core.stdc.stdio; 
import std.algorithm; 

int gcd(int a, int b){ 
while (a > 0 && b > 0){ 
if (a > b){ 
a = a % b; 
} else { 
b = b % a; 
} 
} 
return a + b; 
} 

int main(string[] argv) 
{ 
int n; 
scanf("%d", &n); 
int [] arr = new int[n]; 
for(int i = 0; i<n; i++) 
scanf("%d", &arr[i]); 
arr.sort!(); 
int cur = arr[1] - arr[0]; 
for (int i = 1; i < n; i++){ 
cur = gcd(cur, arr[i] - arr[i - 1]); 
} 
int ans = 0; 
for (int i = 1; i < n; i++){ 
int len = arr[i] - arr[i - 1]; 
ans += len / cur - 1; 
} 
printf("%d", ans); 
return 0; 
}