Patriotic Painting 2
Execution time limit is 1 second
Runtime memory usage limit is 256 megabytes
You are given a strip , consisting of yellow cells.
You will do operations with this strip. In the -th operation, you must select some exactly consecutive cells of this strip, and paint all of them blue (if the cell was yellow, it will turn blue, and if it was blue, it will remain blue).
How many different colorings of the strip can you get? Since this number can be very large, print it modulo .
Two colorings of the strip are considered different if some cell is painted yellow in one of them and blue in the other one.
Input
The first line contains two integers ().
The second line contains integers ().
Output
Output the number of different colorings of the strip that you can get modulo .
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3