import java.util.Scanner

object Main {
  def solve(n: Int, a: IndexedSeq[Int]): Long = {
    val s = a.sum
    val dp1: Array[Array[Long]] = Array.fill(n + 1)(Array.fill(s + 1)(0))
    val dp23: Array[Array[Long]] = Array.fill(n + 1)(Array.fill(s / 2 + 1)(0))
    dp1(0)(0) + dp23(0)(0)
  }

  def main(args: Array[String]): Unit = {
    val (n, a) = read()
    println(solve(n, a))
  }

}