#include <bits/stdc++.h>
using namespace std;
vector<int> vec[100100];
int n;
const int mod = 1e9 + 7;
int dp[100100];
int tmp[100100];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int x;
    scanf("%d", &x);
    for (int j = 1; j * j <= x; ++j) {
      if (x % j == 0) {
        vec[j].push_back(i);
        if (x / j != j && x / j <= n) vec[x / j].push_back(i);
      }
    }
  }
  for (int i = 1; i <= n + 1; ++i) {
    vec[i].push_back(n);
    dp[(int)vec[i].size() - 1] = 1;
  }
  for (int i = n; i >= 1; --i) {
    int sum = 0;
    for (int j = vec[i].size() - 1; j >= 0; --j) {
      int x = vec[i][j];
      int nxt = upper_bound(vec[i + 1].begin(), vec[i + 1].end(), x) -
                vec[i + 1].begin();
      if (nxt == vec[i + 1].size()) nxt--;
      sum += dp[nxt];
      if (sum >= mod) sum -= mod;
      tmp[j] = sum;
    }
    for (int j = vec[i].size() - 1; j >= 0; --j) {
      dp[j] = tmp[j];
      tmp[j] = 0;
    }
  }
  cout << dp[0] - 1 << endl;
  return 0;
}
