#include <bits/stdc++.h>
using namespace std;
int n, v[100005], dp[100005], sol;
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> v[i];
  }
  dp[0] = 1;
  for (int i = 1; i <= n; ++i) {
    int aux = 1;
    while (aux * aux <= v[i]) ++aux;
    --aux;
    for (int j = aux; j >= 1; --j)
      if (v[i] % j == 0) {
        if (i >= v[i] / j && v[i] / j != j)
          dp[v[i] / j] = 1LL * (dp[v[i] / j] + dp[v[i] / j - 1]) % 1000000007;
        dp[j] = 1LL * (dp[j] + dp[j - 1]) % 1000000007;
      }
  }
  for (int i = 1; i <= n; ++i) sol = 1LL * (sol + dp[i]) % 1000000007;
  cout << sol;
  return 0;
}
