#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int X = 1e6 + 5;
const int mod = 1e9 + 7;
int n, a[N], way[N], old[N];
vector<int> fac[X];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  for (int i = 1; i <= n; i++) {
    for (int j = i; j < X; j += i) {
      fac[j].push_back(i);
    }
  }
  way[0] = 1;
  for (int i = 0; i < n; i++) {
    memcpy(old, way, sizeof(way));
    for (int f : fac[a[i]]) {
      (way[f] += old[f - 1]) %= mod;
    }
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    (ans += way[i]) %= mod;
  }
  printf("%d\n", ans);
}
