#A0583. 争先红葫芦

争先红葫芦

Title Description

33DAI has been playing "Black Myth: Wukong" recently. He got a prop called 'Striving for the Red Gourd'.

The game character "Wukong" controlled by 33DAI has an attribute of health value, with a maximum health value of xx. The initial health value of "Wukong" is xx. When the health value is less than or equal to 00, "Wukong" is defeated.

Wukong can use Qianxian Honghuluto restore the health of game characters, up to a maximum of nn times.

-For the first time, you can change your Qi and Blood value to xx . -Afterwards, you can increase your HP value by x3\lfloor \frac{x}{3}\rflooreach time (i.e. rounding 13\frac{1}{3} below xx). If the increase is greater than xx, it will only become xx.

33DAI is manipulating the battle between "Wukong" and "Guangzhi". "Guangzhi" has launched a total of m attacks, and the i-th attack will reduce Wukong's HP by aia_i. After each attack, 'Wukong' can use the 'Striving Red Gourd' several times (or not).

May I ask if 33DAI will be defeated by using the first to compete with the Red Gourd. If you will be defeated, please output the number of times you were defeated in the attack. If you will not be defeated, please output 1-1 .

Input format

The first line consists of three numbers: xx, nn, and mm.

The second line is mm number a1ama_1 \sim a_m .

Output format

If you will be defeated, please output the number of times you were defeated in the attack. If you will not be defeated, please output 1-1 .

Example

100 4 5
50 45 60 60 70
-1
100 100 1
101
1
100 0 5
1 1 98 1 1
3

Example explanation

Example 1:

One solution to using gourds is:

  • The initial HP value is 100100
  • After the first attack, the HP value is 5050
  • After the second attack, the HP value is 55 . At this time, using the gourd once will restore the HP value to 100100$
  • After the third attack, the HP value is 4040. At this time, using the gourd for 22 times will restore 3333 HP each time, and the HP value will be restored to $100.
  • After the fourth attack, the HP value is 4040 . At this time, using the gourd once will restore 3333 HP, and the HP value will be restored to 7373 .
  • After the fifth attack, the HP value is 33

Example 2:

After one attack, Wukong was defeated.

Data scale and agreement

For data of 100%100\%, 1x1001\le x\le 100, 0n,m1000\le n,m\le 100, 0ai1090\le a_i\le 10^9.

  • Subtask 1 (30 points): Ensure that "Wukong" will not be defeated.
  • Subtask 2 (30 points): Ensure that x=1x=1.
  • Subtask 3 (40 points): No special restrictions.