#include<iostream>
using namespace std;
int main(){
  int n;
  cin >> n;
  long long int a[n];
  long long int c = 1;
  long long int count = 0;
  cin >> a[0];
  count = a[0]-1;
  a[0] = 1;
  for(int i=1;i<n;i++){
    cin >> a[i];
      if(c+1==a[i])
	c = a[i];
      else if(c+1<a[i]){
	count += a[i]/(c+1);
	a[i] %= (c+1);
	if(a[i]==0) count--;
      }
  }
  cout << count << endl;
  return 0;
}
