#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int a[MAXN];
long long res = 0;
int z;
int kfactors[MAXN];
int kpowers[MAXN];
int curpowers[MAXN];
bool ok() {
  for (int i = 0; i < z; i++) {
    if (curpowers[i] < kpowers[i]) {
      return false;
    }
  }
  return true;
}
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int tmp = k;
  for (int i = 2; i * i <= tmp; i++) {
    int cnt = 0;
    while (tmp % i == 0) {
      tmp /= i;
      cnt++;
    }
    if (cnt != 0) {
      kfactors[z] = i;
      kpowers[z] = cnt;
      z++;
    }
  }
  if (tmp != 1) {
    kfactors[z] = tmp;
    kpowers[z] = 1;
    z++;
  }
  int j = 0;
  for (int i = 0; i < n; i++) {
    while (j <= i || (j < n && !ok())) {
      int tmp2 = a[j];
      for (int fi = 0; fi < z; fi++) {
        while (tmp2 % kfactors[fi] == 0) {
          curpowers[fi]++;
          tmp2 /= kfactors[fi];
        }
      }
      j++;
    }
    if (ok()) {
      res += (n - j + 1);
    }
    int tmp3 = a[i];
    for (int fi = 0; fi < z; fi++) {
      while (tmp3 % kfactors[fi] == 0) {
        curpowers[fi]--;
        tmp3 /= kfactors[fi];
      }
    }
  }
  cout << res << endl;
}
