Problems
AFA Function
AFA Function
Given a sequence of \textbf{n} integers. By definition, \textbf{AFA(i, j)} is the sum of all elements of the specified sequence between the indices \textbf{i} and \textbf{j}, inclusive, for \textbf{0} ≤ \textbf{i} ≤ \textbf{j} < \textbf{n}. Find the minimum of the function.
\InputFile
The inputs are two lines: the first contains the number \textbf{N} (\textbf{1} ≤ \textbf{N} ≤ \textbf{2000}), the second - a sequence of \textbf{N} numbers. The value of any element of a sequence to the module does not exceed \textbf{100}. The numbers are separated by spaces.
\OutputFile
Bring minimum of \textbf{AFA}.
Input example #1
2 1 5
Output example #1
1