#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long> > v;
long long n, k, a[100005], cnt[100005][15];
void fact() {
  int c = 0;
  while (k % 2 == 0) {
    c++, k /= 2;
  }
  if (c) v.push_back({2, c});
  for (int i = 3; i * i <= k; i++) {
    if (k % i == 0) {
      c = 0;
      while (k % i == 0) {
        k /= i;
        c++;
      }
      v.push_back({i, c});
    }
  }
  if (k > 2) v.push_back({k, 1});
}
int get(long long x, long long pw) {
  long long pww = pw;
  for (int i = 1; i <= 35; i++) {
    if (x % pww) return i - 1;
    pww *= pw;
  }
}
bool check(int l, int r) {
  for (int j = 0; j < v.size(); j++) {
    if (cnt[r][j] - cnt[l - 1][j] >= v[j].second) continue;
    return 0;
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  fact();
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    for (int j = 0; j < v.size(); j++) {
      cnt[i][j] = get(a[i], v[j].first);
      cnt[i][j] += cnt[i - 1][j];
    }
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    long long l = i, h = n, mid, idx = 1e9;
    while (l <= h) {
      mid = (l + h) / 2;
      if (check(i, mid)) {
        idx = min(idx, mid);
        h = mid - 1;
      } else
        l = mid + 1;
    }
    if (idx != (long long)1e9) ans += (n - idx + 1);
  }
  cout << ans << "\n";
  return 0;
}
