#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 5;
const long long MOD = 1e9 + 7;
long long n, a[N], cnt[N], ans = 0;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  cnt[0] = 1;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    vector<long long> cur;
    for (long long j = 1; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        cur.push_back(j);
        if (j != a[i] / j) cur.push_back(a[i] / j);
      }
    }
    sort(cur.begin(), cur.end());
    reverse(cur.begin(), cur.end());
    for (auto &it : cur) {
      cnt[it] += cnt[it - 1];
      cnt[it] %= MOD;
    }
  }
  for (long long i = 1; i <= n; i++) ans += cnt[i];
  ans %= MOD;
  cout << ans;
  return 0;
}
