import scala.io.StdIn.* import scala.util.chaining.* import scala.math.* @main def main = val n = readLine().toInt val num = readLine().split(' ').map(_.toInt) var result = 0L for count <- 0 to 200 do val minusCount = Array.fill(count + 1){0L}.tap(array => array(0) = 1) for a <- num do if a <= count then val diff = count - a for i <- count to diff by -1 do minusCount(i) += minusCount(i - diff) result += minusCount(count) result -= num.count(_ == 0) * 201 + 1 println(result)