#include <bits/stdc++.h>
using namespace std;
const int N = int(1e5) + 5;
const int MOD = int(1e9) + 7;
int n, x, dp[N];
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  cin >> n;
  dp[0] = 1;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    vector<int> uoc;
    for (int j = 1; j <= sqrt(x); j++) {
      if (x % j == 0) {
        uoc.push_back(j);
        if (x / j <= n && x / j != j) uoc.push_back(x / j);
      }
    }
    sort(uoc.begin(), uoc.end());
    for (int j = uoc.size() - 1; j >= 0; j--) {
      dp[uoc[j]] += dp[uoc[j] - 1];
      if (dp[uoc[j]] >= MOD) dp[uoc[j]] -= MOD;
    }
  }
  int res = 0;
  for (int i = 1; i <= n; i++) res = (res + dp[i]) % MOD;
  cout << res;
  return 0;
}
