Let be the infinite sequence such that:
- The first element is ,
- It consists of and , and
- Its run length sequence is equal to .
Here, for example, we assume that the run length sequence of is .
We can verify that
- , and
- .
Let be the number of in the first elements of .
For example, and = 3.
Let .
You are given and .
Find .