#include <bits/stdc++.h>
using namespace std;
const long long int M = 1e9 + 7;
const long long int N = 1e5 + 5;
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long int n;
  cin >> n;
  long long int a[n + 1];
  for (long long int i = 1; i <= n; i++) cin >> a[i];
  long long int dp[1000001] = {0};
  dp[0] = 1;
  long long int ans = 0;
  for (long long int i = 1; i <= n; i++) {
    vector<long long int> res;
    vector<long long int> res2;
    for (long long int j = 1; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        res.push_back(j);
        if (a[i] / j != j) res.push_back(a[i] / j);
      }
    }
    for (long long int j = 0; j < res.size(); j++) {
      res2.push_back(dp[res[j] - 1]);
    }
    for (long long int j = 0; j < res.size(); j++) {
      dp[res[j]] = (dp[res[j]] + res2[j]) % M;
    }
  }
  for (long long int i = 1; i < 1000001; i++) {
    ans = (ans + dp[i]) % M;
  }
  cout << ans;
}
