The University of Zagreb team, Stjepan, Ivan and Gustav, is competing in the World Finals of the ACM International Collegiate Programming Contest in Morocco. Goran, their technical guide, has prepared a winning strategy for solving the tasks in the finals.
At the very start, each team member quickly estimates the difficulty of all N tasks. A difficulty is a number from 1 to 5 with the following meaning.
After that they share out the tasks. To keep things simple, the list of tasks is cut into three parts and each team member takes one block of consecutive tasks. No block may be empty. They are free to decide who takes which block. The sum of difficulties adds, for every task, only the estimate written by the member that task went to, and they cut the list so that this sum is as small as possible. Compute the smallest possible sum.
The first line contains the integer N (3≤N≤150000), the number of tasks.
Each of the next three lines contains N integers between 1 and 5. The first of those lines holds Stjepan's estimates, the second Ivan's and the third Gustav's.
Print the minimal sum of difficulties on a single line.
In the first sample Stjepan takes the first task, Gustav the second and Ivan the third.