#include <bits/stdc++.h>
using namespace std;
int noOfOne(int n) {
  int c = 0;
  while (n) {
    c += (n & 1);
    n >>= 1;
  }
  return c;
}
unsigned long long int f(unsigned long long int n, unsigned long long int r) {
  if (n - r > r) {
    unsigned long long int temp = n, temp2 = r;
    unsigned long long int ans = 1;
    while (temp > (n - r)) {
      ans *= temp;
      --temp;
    }
    while (temp2) {
      ans /= temp2;
      --temp2;
    }
    return ans;
  }
  unsigned long long int temp = n, temp2 = n - r;
  unsigned long long int ans = 1;
  while (temp > r) {
    ans *= temp;
    --temp;
  }
  while (temp2) {
    ans /= temp2;
    --temp2;
  }
  return ans;
}
const unsigned long long int N = 1e6 + 5;
const unsigned long long int MOD = 1e9 + 7;
unsigned long long int n, cnt[N], ans = 0;
int32_t main() {
  cin >> n;
  unsigned long long int num;
  cnt[0] = 1;
  for (int i = 1; i <= n; i++) {
    cin >> num;
    vector<unsigned long long int> cur;
    for (unsigned long long int j = 1; j * j <= num; j++) {
      if (num % j == 0) {
        cur.push_back(j);
        if (j != num / j) cur.push_back(num / j);
      }
    }
    sort(cur.begin(), cur.end());
    for (int i = cur.size() - 1; i >= 0; i--) {
      cnt[cur[i]] += cnt[cur[i] - 1];
      cnt[cur[i]] %= MOD;
    }
  }
  for (int i = 1; i <= n && cnt[i] != 0; i++) ans += cnt[i];
  ans %= MOD;
  cout << ans;
  return 0;
}
