#include <bits/stdc++.h>
using namespace std;
int n;
int a[100005];
vector<int> pos[1000006], np[100005];
vector<int> cum[100005];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int i, j, k;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> j;
    pos[j].push_back(i);
  }
  for (i = 1; i <= 100000; i++) {
    np[i].push_back(0);
    for (j = i; j <= 1000000; j += i) {
      for (auto it : pos[j]) np[i].push_back(it);
    }
    sort(np[i].begin(), np[i].end());
    cum[i].resize(np[i].size());
    cum[i][0] = 0;
  }
  int ans = 0;
  for (i = 1; i < np[1].size(); i++) {
    cum[1][i] = i;
    ans++;
  }
  for (i = 2; i <= n; i++) {
    for (j = 1; j < np[i].size(); j++) {
      int idx = np[i][j];
      int pos = lower_bound(np[i - 1].begin(), np[i - 1].end(), idx) -
                np[i - 1].begin() - 1;
      ans += (cum[i - 1][pos]);
      ans %= 1000000007;
      cum[i][j] = cum[i][j - 1] + cum[i - 1][pos];
      cum[i][j] %= 1000000007;
    }
  }
  cout << ans;
  return 0;
}
