#include <bits/stdc++.h>
using namespace std;
long long qpow(long long x, long long y, long long mod) {
  long long s = 1;
  while (y) {
    if (y & 1) s = s * x % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return s;
}
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
const int mod = 1e9 + 7;
int n, x;
long long dp[(int)1e6 + 5];
vector<long long> v[(int)1e6 + 5];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    v[i].clear();
    for (int j = 1; j * j <= x; j++) {
      if (x % j == 0) {
        v[i].push_back(j);
        if (x != j * j) v[i].push_back(x / j);
      }
    }
    sort(v[i].begin(), v[i].end());
  }
  long long ans = 0;
  dp[0] = 1;
  for (int i = 1; i <= n; i++)
    for (int j = v[i].size() - 1; j >= 0; j--)
      dp[v[i][j]] = (dp[v[i][j] - 1] + dp[v[i][j]]) % mod;
  for (int i = 1; i <= n; i++) ans = (ans + dp[i]) % mod;
  cout << ans << endl;
  return 0;
}
