Oops, you're right! I missed that bait and switch, where one formula was used for introduction, a different formula to demonstrate examples, and then switched back to the first for the conclusion.
The actual formula they implemented is ( rshares + s ) * ( rshares + s ) - s * s / ( rshares + 4 * s )
It's a bit more complex than explained in the deep-dive, and I don't feel qualified to explain it properly.