import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val n = sc.nextInt

  val a = sc.nextInt
  val xs = Vector.fill(n)(sc.nextDouble)

  val ints = for (i <- 1 to n) yield (0 until n).combinations(i)

  val dA = a.toDouble
  var ans = 0L
  for {
    p <- ints.flatten
  } yield {
    val ave = p.map(xs(_)).sum / p.length
    if (ave == dA) {
      ans = ans + 1L
    }
  }

  println(ans)
}
