#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7, maxItem = 1e6 + 2;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> cnt(maxItem);
  vector<int> hA;
  int ans = 0, x;
  cnt[0] = 1;
  for (int i = 0; i < n; ++i) {
    cin >> x;
    hA.clear();
    for (int j = 1; j * j <= x; ++j)
      if (x % j == 0) {
        ans = (ans + cnt[j - 1]) % mod;
        hA.push_back(j);
        if (j * j != x) {
          ans = (ans + cnt[x / j - 1]) % mod;
          hA.push_back(x / j);
        }
      }
    sort(hA.begin(), hA.end(), greater<int>());
    for (int e : hA) cnt[e] = (cnt[e] + cnt[e - 1]) % mod;
  }
  cout << ans << '\n';
  return 0;
}
