Young Alisa likes to play the piano using only one finger. Unfortunately, Alisa never learned to play the piano, so her playing is entirely random. More precisely, any time she chooses a tone to play, she does it independently of all previous tones, and chooses each of the
Her good friend Mirta wants to listen to a composition containing
Input Specification
The first line of input contains the positive integer
The second line of input contains the positive integer
The third line of input contains the array of
Output Specification
The
The test data will be such that the expected number of key presses will always be an integer.
Scoring
In test cases worth
Sample Input 1
2
2
1 2
Sample Output 1
2
4
Sample Input 2
2
2
1 1
Sample Output 2
2
6
Sample Input 3
3
3
1 2 3
Sample Output 3
3
9
27
Comments