#include <cassert>
#include <cstdio>

int main()
{
  assert(freopen("standing.in", "r", stdin) == stdin);
  assert(freopen("standing.out", "w", stdout) == stdout);

  int a, m, n, ans = 0;
  assert(scanf("%d%d", &n, &m) == 2);
  for (int i = 0; i < n; i++)
  {
    assert(scanf("%d", &a) == 1);
    while (m % (++a) == 0)
      ans++;
  }
  assert(printf("%d\n", ans) >= 0);

  return 0;
}

