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$$$.
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.
A single integer that represents the total number of weights in the network.
3 5 10 5
100