#include <bits/stdc++.h>
using namespace std;
long long n, k, win, m;
long long a[100100], product = 1, ans, s[100100];
long long pfk[30], cfk[30];
long long cur[30];
int cnt = 0;
bool isprime(long long m) {
  if (m == 1 || m == 0) return false;
  for (int i = 2; i * i <= m; ++i) {
    if (m % i == 0) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int j = 1; j * j <= k; ++j) {
    if (k % j == 0) {
      if (isprime(j)) {
        pfk[cnt++] = j;
      }
      if (isprime(k / j)) {
        pfk[cnt++] = k / j;
      }
    }
  }
  for (int l = 0; l < cnt; ++l) {
    long long p = k;
    while (p % pfk[l] == 0 && p) {
      cfk[l]++;
      p /= pfk[l];
    }
  }
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int last, first = 0;
  for (last = 0; last < n; last++) {
    for (int l = 0; l < cnt; ++l) {
      long long b = a[last];
      while (b % pfk[l] == 0 && b) {
        cur[l]++;
        b /= pfk[l];
      }
    }
    int not_enough = 0;
    for (int l = 0; l < cnt; ++l) {
      if (cfk[l] > cur[l]) not_enough = 1;
    }
    while (not_enough == 0 && first <= last) {
      first++;
      ans += (n - last);
      for (int l = 0; l < cnt; ++l) {
        long long b = a[first - 1];
        while (b % pfk[l] == 0 && b) {
          cur[l]--;
          b /= pfk[l];
        }
      }
      not_enough = 0;
      for (int l = 0; l < cnt; ++l) {
        if (cfk[l] > cur[l]) not_enough = 1;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
