#include <bits/stdc++.h>
using namespace std;
int check(vector<int> &x, const int a, const int n, int index, int sum,
          int cnt) {
  if (cnt <= 0 || index >= n) return sum;
  sum += x[index];
  check(x, a, n, index + 1, sum, cnt - 1);
}
int main() {
  int n, a;
  cin >> n >> a;
  vector<int> x(n);
  for (int i = 0; i < n; ++i) cin >> x[i];
  int res = 0;
  for (int i = 0; i < n; ++i)
    if (check(x, a, n, 0, 0, i + 1) / i == a) ++res;
  cout << res << endl;
  return 0;
}
