#include <bits/stdc++.h>
using namespace std;
void dynamic() {
  int n;
  cin >> n;
  vector<vector<int> > v;
  v.resize(n);
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (int j = 1; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        v[i].push_back(j);
        if (j != a[i] / j) v[i].push_back(a[i] / j);
      }
    }
  }
  long long int ans = 0;
  long long int dp[n + 1];
  long long int last[n + 1];
  memset(dp, 0, sizeof(dp));
  memset(last, 0, sizeof(last));
  last[0] = 1;
  dp[0] = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < v[i].size(); j++) {
      if (v[i][j] <= n) {
        ans += dp[v[i][j] - 1] % 1000000007;
        ans %= 1000000007;
      }
    }
    for (auto it : v[i]) {
      if (it <= n) {
        last[it - 1] = dp[it - 1];
        last[it] = dp[it];
      }
    }
    for (auto it : v[i]) {
      if (it <= n) {
        dp[it] += last[it - 1];
        dp[it] %= 1000000007;
      }
    }
  }
  ans = 0;
  for (int i = 1; i <= n; i++) {
    ans += dp[i];
    ans %= 1000000007;
  }
  cout << ans % 1000000007 << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    dynamic();
  }
}
