Bobo is playing *Heartstone*. There are n minions in the battlefield. The i-th minion has hih_ihi hit points . 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 , while *Frostbolt* can deal **three** points damage. A minion is killed when its HP is less or equal to zero. Let f be the minimum number of *Frostbolt* required to kill all minions, if no more than a *Arcane Shot* are used. Bobo would like to find out f+f++ff + f + dots + ff+f++f modulo .
Bobo is playing *Heartstone*. There are n minions in the battlefield. The i-th minion has hih_ihi 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 f(0)+f(1)+⋯+f(m)f(0) + f(1) + dots + f(m)f(0)+f(1)+⋯+f(m) modulo (109+7)(10^9+7)(109+7).