#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 1000;
const long long LINF = (long long)INF * INF;
const int MOD = INF + 7;
const int MAX = 2e5;
const double EPS = 1e-9;
const double PI = acos(-1.);
vector<int> cl[100001];
int a[100005];
int dp[2][100005];
int n;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i1 = (0); i1 < (n); ++i1) {
    cin >> a[i1];
    for (int i = 1; i * i <= a[i1]; ++i) {
      if (a[i1] % i == 0) {
        cl[i].push_back(i1);
        if (i != a[i1] / i && a[i1] / i <= n) {
          cl[a[i1] / i].push_back(i1);
        }
      }
    }
  }
  for (int i = (1); i < (n + 1); ++i) {
    sort(cl[i].begin(), cl[i].end());
  }
  long long res = 0;
  memset(dp, 0, sizeof(dp));
  for (int i = (0); i < (n); ++i) {
    dp[1][i] = 1;
    res++;
  }
  for (int i = (2); i < (n + 2); ++i) {
    long long sum = 0;
    for (int j = 0, k = 0; k < cl[i].size();) {
      if (j == cl[i - 1].size()) {
        dp[i % 2][cl[i][k]] = sum;
        dp[i % 2][cl[i][k]] %= MOD;
        res += sum;
        res %= MOD;
        k++;
        continue;
      }
      if (cl[i - 1][j] == cl[i][k]) {
        dp[i % 2][cl[i][k]] = sum;
        dp[i % 2][cl[i][k]] %= MOD;
        res += sum;
        res %= MOD;
        sum += dp[(i % 2) ^ 1][cl[i - 1][j]];
        sum %= MOD;
        k++;
        j++;
        continue;
      }
      if (cl[i - 1][j] < cl[i][k]) {
        sum += dp[(i % 2) ^ 1][cl[i - 1][j]];
        sum %= MOD;
        j++;
        continue;
      }
      dp[i % 2][cl[i][k]] = sum;
      dp[i % 2][cl[i][k]] %= MOD;
      res += sum;
      res %= MOD;
      k++;
    }
    for (int j = (0); j < (cl[i - 1].size()); ++j) {
      dp[(i % 2) ^ 1][cl[i - 1][j]] = 0;
    }
  }
  cout << res << endl;
  return 0;
}
