#include <bits/stdc++.h>
using std::cout;
using std::endl;
using std::cin;

int main(){
	int n; cin >> n; long ans = 0, pos = 1;
	for(int i = 0; i < n; i++){
		int a; cin >> a;
		
		ans += (a - 1) / pos;
		if(pos == a or pos == 1) pos++;
	}
	
	cout << ans << endl;
	return 0;
}
