{"raw_statement":[{"iden":"statement","content":"As computers have become more and more powerful, the use of artificial intelligence has become ever more prominent in modern computing. As a result, a mechanism called a neural network has become a very commonly used tool for replicating the basic biological processes that result in the function of the brain. Neural Networks are composed of a series of \"layers\" of nodes, where each node of layer $i$ will connect with every node of layer $i + 1$. \n\nThe first line contains a single integer $N$ that represents the number of layers. The next line contains $N$ space-separated integers that represent the number of nodes in each layer respectively.\n\nA single integer that represents the total number of weights in the network.\n\n"},{"iden":"input","content":"The first line contains a single integer $N$ that represents the number of layers. The next line contains $N$ space-separated integers that represent the number of nodes in each layer respectively."},{"iden":"output","content":"A single integer that represents the total number of weights in the network."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ N \\in \\mathbb{Z}^+ $ be the number of layers.  \nLet $ n_i \\in \\mathbb{Z}^+ $ denote the number of nodes in layer $ i $, for $ i \\in \\{1, 2, \\dots, N\\} $.\n\n**Constraints**  \n$ N \\geq 1 $, and $ n_i \\geq 1 $ for all $ i \\in \\{1, \\dots, N\\} $.\n\n**Objective**  \nCompute the total number of weights in the neural network:  \n$$\n\\sum_{i=1}^{N-1} n_i \\cdot n_{i+1}\n$$","simple_statement":"Given N layers of a neural network, where each layer connects to the next, calculate the total number of weights between consecutive layers.","has_page_source":false}