#include <bits/stdc++.h>
using namespace std;
const long long N = 1000005;
long long dp[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < (n); i++) {
    cin >> arr[i];
  }
  memset(dp, 0, (N) * sizeof(long long));
  dp[0] = 1;
  for (long long i = (1); i < (n + 1); i++) {
    vector<long long> s;
    for (long long j = 1; j <= sqrt(arr[i - 1]); j++) {
      if (arr[i - 1] % j == 0) {
        if (arr[i - 1] / j == j)
          s.push_back(j);
        else {
          s.push_back(j);
          s.push_back(arr[i - 1] / j);
        }
      }
    }
    sort(s.begin(), s.end(), greater<long long>());
    for (auto const& x : s) {
      dp[x] = (dp[x] + dp[x - 1]) % 1000000007;
    }
  }
  long long sum = 0;
  for (long long i = (1); i < (N); i++) {
    sum = (sum + dp[i]) % 1000000007;
  }
  cout << sum << endl;
}
