#include <bits/stdc++.h>
using namespace std;
long long n, i, j, ans;
long long a[2000001], dp[2000001], fix[2000001];
vector<long long> v[2000001];
int main() {
  dp[0] = 1;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  for (i = 1; i <= n; i++) {
    if (fix[a[i]] == 0) {
      for (j = 1; j * j <= a[i]; j++) {
        if (a[i] % j == 0) {
          if (a[i] == j * j)
            v[a[i]].push_back(j);
          else {
            v[a[i]].push_back(j);
            v[a[i]].push_back(a[i] / j);
          }
        }
      }
      fix[a[i]] = 1;
    }
  }
  for (i = 1; i <= n; i++) {
    for (j = v[a[i]].size() - 1; j >= 0; j--) {
      dp[v[a[i]][j]] = (dp[v[a[i]][j]] + dp[v[a[i]][j] - 1]) % 1000000007;
    }
  }
  for (i = 1; i <= n; i++) {
    ans = (ans + dp[i]) % 1000000007;
  }
  cout << ans << endl;
}
