#include <bits/stdc++.h>
using namespace std;
long long b[1000005] = {1};
long long c[1000005] = {1};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    for (int j = 1; j * j <= a; j++) {
      if (a % j == 0) {
        c[j] = (b[j] + b[j - 1]) % 1000000007;
        if (j != a / j) {
          c[a / j] = (b[a / j] + b[a / j - 1]) % 1000000007;
        }
      }
    }
    for (int j = 1; j * j <= a; j++) {
      if (a % j == 0) {
        b[j] = c[j];
        b[a / j] = c[a / j];
      }
    }
  }
  long long result = 0;
  for (int i = 1; i < 1000005; i++) {
    result = (result + b[i]) % 1000000007;
  }
  cout << result << endl;
  return 0;
}
