#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, long long int n, long long int y) {
  long long int result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % y;
    x = (x * x) % y;
    n = n / 2;
  }
  return result;
}
long long int GCD(long long int A, long long int B) {
  if (B == 0)
    return A;
  else
    return GCD(B, A % B);
}
const long long int N = 1e6 + 5;
const long long int MOD = 1e9 + 7;
long long int n, a[N], cnt[N], ans = 0;
int main() {
  cin >> n;
  cnt[0] = 1;
  for (long long int i = 1; i <= n; i++) {
    cin >> a[i];
    vector<long long int> cur;
    for (long long int j = 1; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        cur.push_back(j);
        if (j != a[i] / j) cur.push_back(a[i] / j);
      }
    }
    sort(cur.begin(), cur.end(), greater<long long int>());
    for (auto &it : cur) {
      cnt[it] += cnt[it - 1];
      cnt[it] %= MOD;
    }
  }
  for (long long int i = 1; i <= n; i++) {
    ans += cnt[i];
  }
  ans %= MOD;
  cout << ans;
  return 0;
}
