#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
const double pi = acos(-1);
long long dp[1000006];
int main() {
  long long n;
  cin >> n;
  long long a[n + 1];
  memset(dp, 0, sizeof(dp));
  dp[0] = 1;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    vector<long long> v;
    for (long long j = 1; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        if (a[i] / j == j) {
          v.push_back(j);
        } else {
          v.push_back(j);
          v.push_back(a[i] / j);
        }
      }
    }
    sort(v.begin(), v.end(), greater<long long>());
    for (long long j = 0; j < v.size(); j++) {
      dp[v[j]] += dp[v[j] - 1];
      dp[v[j]] %= M;
    }
  }
  long long ans = 0;
  for (long long i = 1; i <= n; i++) {
    ans += dp[i];
    ans %= M;
  }
  cout << ans << endl;
  return 0;
}
