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

int main(){
    int n,a[100010];
    cin>>n;
    for(int i=0;i<n;i++) cin>>a[i];
    ll ans = a[0]-1;
    int k = 2;
    for (int i = 1; i < n; ++i) {
        if (a[i]>k) ans += (a[i] - 1) / k;
        if (a[i]==k) k++;
    }
  cout << ans << endl;
  return 0;
}