#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int MAXN = 1e5 + 5;
vector<int> d[MAXN];
int n;
void solve(int num, int idx) {
  for (int i = 1; i * i <= num; i++) {
    if (num % i == 0) {
      d[i].push_back(idx);
      if (num / i != i && num / i <= n) {
        d[num / i].push_back(idx);
      }
    }
  }
}
map<pair<int, int>, int> memo;
int dp(int idx = 1, int pos = 0) {
  if (memo.count({idx, pos})) {
    return memo[{idx, pos}];
  }
  int ans = 1;
  auto it1 = lower_bound(d[idx + 1].begin(), d[idx + 1].end(), pos + 1);
  if (it1 != d[idx + 1].end()) {
    ans += dp(idx + 1, *it1);
  }
  ans %= mod;
  auto it2 = lower_bound(d[idx].begin(), d[idx].end(), pos + 1);
  if (it2 != d[idx].end()) {
    ans += dp(idx, *it2);
  }
  ans %= mod;
  return memo[{idx, pos}] = ans;
}
int main() {
  int a;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a);
    solve(a, i);
  }
  cout << dp() << endl;
}
