
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
The sequence consists of \( k \) zeros and \( m \) ones, arranged in random order. We divide the sequence into alternating groups of zeros and ones (a group is a segment consisting of all identical digits standing in a row). The total number of groups is a random variable. Find its expected value.

Present the answer in LaTex format: \boxed{Your answer}
user