#include <bits/stdc++.h>
using namespace std;
const int M1 = 1000000007;
const int M2 = 998244353;
const int N = 100005;
int arr[N];
int dp[1000005];
void update(int num) {
  int i = 1;
  vector<int> curr;
  while (i * i <= num) {
    if (num % i == 0) {
      curr.push_back(i);
      if (i != (num / i)) {
        curr.push_back(num / i);
      }
    }
    i++;
  }
  sort(curr.begin(), curr.end());
  reverse(curr.begin(), curr.end());
  for (auto &i : curr) {
    dp[i] += dp[i - 1];
    dp[i] %= M1;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n, m, k, a, b, temp;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  dp[0] = 1;
  for (int i = 0; i < n; i++) {
    update(arr[i]);
  }
  long long int sum = 0;
  sum = accumulate(dp + 1, dp + n + 1, sum);
  cout << sum % M1 << "\n";
}
