Solution (source code)

= Solution

The length is
$$
\boxed{2n-1}.
$$
Indeed, the <parse tree> has $n$ terminal-production nodes and, as a full binary tree with $n$ leaves, $n-1$ binary-production nodes. This is the <Chomsky-normal-form derivation length>.