Patriotic Painting 2
Ограничение по времени выполнения 1 секунда
Ограничение по использованию памяти 256 мегабайт
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.
Входные данные
The first line contains two integers ().
The second line contains integers ().
Выходные данные
Output the number of different colorings of the strip that you can get modulo .
Примеры
Ввод #1
Ответ #1
Ввод #2
Ответ #2
Ввод #3
Ответ #3