Heartstone
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
Special Judge, 64bit IO Format: %lld

题目描述

Bobo is playing *Heartstone*.
There are n minions in the battlefield.
The i-th minion has h_i hit points (HP).

Bobo uses two kinds of magic.
The one is *Arcane Shot* and the other is *Frostbolt*.
*Arcane Shot* can deal **two** points damage to a minion
(that is to decrease the minion's HP by two),
while *Frostbolt* can deal **three** points damage.
A minion is killed when its HP is less or equal to zero.

Let f(a) be the minimum number of *Frostbolt*(s) required to kill all minions,
if no more than a *Arcane Shot*(s) are used.
Bobo would like to find out modulo .

输入描述:

The input contains at most 30 sets. For each set:
The first line contains 2 integers n ,m ().
The second line contains n integers ().

输出描述:

For each set, an integer denotes  modulo .
示例1

输入

复制
3 2
1 2 3

输出

复制
6
示例2

输入

复制
3 2
2 2 2

输出

复制
6