#include <bits/stdc++.h>
using namespace std;

int main( void ) {
    
    int n;
    cin >> n;
    
    long long ans = 0;
    for( int i = 1, aux = 1; i <= n; i ++ ) {
        int x;
        cin >> x;
        
        if( aux == 1 ) {
            ans += x - 1;
            aux ++;
        }
        else
        if( x == aux )
            aux ++;
        else
            ans += ( x - 1 ) / aux;
    }
    
    cout << ans << endl;
    return 0;
}