Sanghun has cubic dice, numbered in order.
Every face of every die bears an integer from to . On each die the numbers on different faces are distinct, and the numbers on any two opposite faces always add up to .
Sanghun wants to build towers using all dice. The procedure is as follows.
For example, the procedure might go as follows.
Sanghun wants to stack the dice so that the number of towers is as small as possible. Given the number on the top face of each of the dice after rolling, find the minimum possible number of towers.
The first line contains an integer .
The next line contains space-separated integers in that order.
Print the minimum possible number of towers on the first line.