#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
const int MAXN = 1e5 + 5;
const int MAXM = 9e4 + 500;
const int N = 500 + 5;
const double EPS = 1e-9;
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, 1, -1};
int i, j, d;
long long n, k, m;
vector<int> dv(int first) {
  vector<int> ans;
  for (int i = 1; i * i <= first && i <= n; i++) {
    if (first % i == 0) {
      int a = first / i;
      int b = first / a;
      if (a <= n) ans.push_back(a);
      if (a != b && b <= n) ans.push_back(b);
    }
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  vector<long long> dp(MAXN);
  cin >> n;
  for (i = 1; i <= n; i++) {
    int first;
    cin >> first;
    vector<int> c = dv(first);
    sort((c).begin(), (c).end(), greater<int>());
    for (auto e : c) {
      if (e == 1) {
        dp[e]++;
        continue;
      }
      dp[e] += dp[e - 1];
      dp[e] %= MOD;
    }
  }
  long long ans = 0;
  for (auto e : dp) ans = (ans + e) % MOD;
  cout << ans;
  return 0;
}
