#include <bits/stdc++.h>
int pk, dp[100000][16];
void factorize(int *pp, int *kk, int x, int i, int isk) {
  int p, j;
  if (isk) {
    for (p = 2; p * p <= x; p++)
      if (x % p == 0) {
        pp[pk] = p, kk[pk] = 0;
        while (x % p == 0) {
          x /= p;
          kk[pk]++;
        }
        pk++;
      }
    if (x > 1) pp[pk] = x, kk[pk++] = 1;
  } else
    for (j = 0; j < pk; j++) {
      int k = 0;
      while (x % pp[j] == 0) {
        x /= pp[j];
        k++;
      }
      dp[i][j] = k;
    }
}
int ok(int *kk, int h, int i) {
  int j;
  for (j = 0; j < pk; j++) {
    int k = dp[i][j] - (h == 0 ? 0 : dp[h - 1][j]);
    if (k < kk[j]) return 0;
  }
  return 1;
}
int main() {
  static int pp[16], kk[16];
  long long cnt;
  int n, k, h, i, j;
  scanf("%d%d", &n, &k);
  factorize(pp, kk, k, -1, 1);
  for (i = 0; i < n; i++) {
    int a;
    scanf("%d", &a);
    factorize(pp, kk, a, i, 0);
  }
  for (i = 1; i < n; i++)
    for (j = 0; j < pk; j++) dp[i][j] += dp[i - 1][j];
  cnt = 0;
  for (i = 0, h = 0; i < n; i++) {
    while (h <= i && ok(kk, h, i)) h++;
    cnt += h;
  }
  printf("%lld\n", cnt);
  return 0;
}
