In the event of technical difficulties with Szkopuł, please contact us via email at szkopul@fri.edu.pl.

If you are familiar with IRC chat, the support team is also reachable on PIRC network (`irc.pirc.pl`

) in `#szkopul`

channel. If you are not, just use email.

Please do not ask us things like "how to solve task XYZ?".

Please remember that the support team has to sleep sometimes or go to work in real life.

Byteasar urgently needs to measure milliliters of water. He went to a shop that sells technical glass. Unfortunately, water measuring glass is out of date and found the shop being wound up. Most of the glass was sold out and there were only two identical defective cylinders. Their defect was that each of them had only a subset of all the necessary scales (in milliliters). Byteasar had no choice: he needed those cylinders, so he bought them. He is facing a new problem now: how to measure milliliters of water using his cylinders?

In the beginning both cylinders are empty. Possible actions that can be performed are:

- pouring water from a tap to a cylinder until water reaches one of the cylinder's scales,
- pouring water from a cylinder to the sink until water reaches one of the cylinder's scales,
- pouring water from one cylinder to the other until water reaches one of the first cylinder's scales,
- pouring water from one cylinder to the other until water reaches one of the second cylinder's scales.

The first line of the input contains one positive integer () that represents the number of scales in each of the cylinders. The second line contains an increasing sequence of integers (separated by single spaces): the scales' values. is always equal to and () is equal to the capacity of each of the cylinders. The third and last line of the input contains one integer ().

If it is impossible for Byteasar to measure the desired amount of water, your program
should output a single word `NIE` (Polish for *no*).
Otherwise your program should output the minimal number of actions
that are necessary to perform the measurement.

For the input data:

4 0 2 5 15 9

the correct result is:

5

*Task author: Jakub Pawlewicz.*