#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long dp[100005], ans;
int v[100005];
vector<int> divs[100005];
void FindDivs(int ind) {
  for (int i = 1; i * i <= v[ind]; i++)
    if (v[ind] % i == 0) {
      divs[ind].push_back(i);
      if (i != v[ind] / i) divs[ind].push_back(v[ind] / i);
    }
  sort(divs[ind].begin(), divs[ind].end(), greater<int>());
}
int main() {
  int N;
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cin >> v[i];
    FindDivs(i);
  }
  dp[1] = 1;
  for (int i = 2; i <= N; i++) {
    for (auto it : divs[i])
      if (it <= i && it != 1) {
        dp[it] += dp[it - 1];
        dp[it] %= MOD;
      }
    dp[1]++;
  }
  for (int i = 1; i <= N; i++) {
    ans += dp[i];
    ans %= MOD;
  }
  cout << ans;
  return 0;
}
