The first line is two integers The number of in the second line, the number of is
Output the number of , which represents the answer, separated by spaces.
6 8 1 1 4 5 1 4
16 15 14 12 11 11 10 10
7 8 1 9 1 9 8 1 0
29 29 28 28 28 27 20 19