#include <bits/stdc++.h>
const int INF = 1000000000;
const int N = 1000000;
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long arr[n + 1];
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long dp[1000000] = {0};
  dp[0] = 1;
  for (long long i = 0; i < n; i++) {
    vector<long long> divisors;
    for (long long j = 1; j * j <= arr[i]; j++) {
      if (arr[i] % j == 0) {
        divisors.push_back(j);
        if (j != arr[i] / j) {
          divisors.push_back(arr[i] / j);
        }
      }
    }
    sort(divisors.begin(), divisors.end(), greater<int>());
    for (long long j = 0; j < divisors.size(); j++) {
      dp[divisors[j]] =
          (dp[divisors[j]] + dp[divisors[j] - 1] + 1000000007) % 1000000007;
    }
  }
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    sum = (sum + dp[i + 1] + 1000000007) % 1000000007;
  }
  cout << sum << endl;
}
