#include <bits/stdc++.h>
using namespace std;
const long long p = 1e9 + 7;
const int N = 1e5 + 10;
int n;
long long f[N][2];
int b[N];
int read() {
  int x = 0, f = 1;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -f;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = x * 10 + s - 48;
    s = getchar();
  }
  return x * f;
}
int main() {
  int a;
  n = read();
  f[0][0] = f[0][1] = 1;
  for (int i = 1; i <= n; i++) {
    a = read();
    int cnt = 0;
    for (int j = 1; (long long)j * j <= (long long)a; j++)
      if (a % j == 0) {
        if (j <= n) b[++cnt] = j;
        if (j * j != a && a / j <= n) b[++cnt] = a / j;
      }
    for (int j = 1; j <= cnt; j++)
      f[b[j]][i & 1] = (f[b[j] - 1][i - 1 & 1] + f[b[j]][i & 1]) % p;
    for (int j = 1; j <= cnt; j++) f[b[j]][i + 1 & 1] = f[b[j]][i & 1];
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) ans = (ans + f[i][n & 1]) % p;
  printf("%lld", ans);
  return 0;
}
