#include <bits/stdc++.h>
using namespace std;
long long a[101000];
long long b[1100000];
long long mod = 1e9 + 7;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < 1100000; i++) {
    b[i] = 0;
  }
  for (long long i = 0; i < n; i++) {
    long long d = 2;
    vector<pair<long long, long long> > v;
    while (d * d < a[i]) {
      if (a[i] % d == 0) {
        long long ch = d;
        v.push_back({ch, b[ch - 1]});
        ch = a[i] / d;
        v.push_back({ch, b[ch - 1]});
      }
      d++;
    }
    if (d * d == a[i]) {
      long long ch = d;
      v.push_back({ch, b[ch - 1]});
    }
    if (a[i] != 1) {
      b[a[i]] += b[a[i] - 1];
      b[a[i]] %= mod;
    }
    for (long long j = 0; j < int32_t(v.size()); j++) {
      b[v[j].first] += v[j].second;
      b[v[j].first] %= mod;
    }
    b[1]++;
    b[1] %= mod;
  }
  long long ans = 0;
  for (long long i = 1; i <= n; i++) {
    ans += b[i];
    ans %= mod;
  }
  cout << ans;
}
