There are many ancient elemental monuments left on the continent of Teyvat. An elemental monument is a magical ancient mechanism, deeply rooted in the ground and unable to move.
Paimon is now solving a puzzle at some location. Here, there are

elemental monuments arranged in a line. From left to right, the coordinate of the

-th monument is

, and each monument has one of two attributes: ice or fire.
If two monuments have different attributes, and the distance between them is strictly less than

, then one piece of elemental particle will appear at their midpoint. A position may produce multiple pieces of elemental particles.
The puzzle requires collecting only the elemental particles that appear at integer coordinates, and the number of collected particles is the password to open the chest. Paimon asks you, the Traveler, for help. How many elemental particles will be collected in the end?