Sanhedrin 1:6 explains the size of the small sanhedrin, but I'm having trouble following the reasoning. It says (my notes in brackets):
From where do we learn that the little Sanhedrin should be made up of twenty three? As it says, “The assembly shall judge”, “The assembly shall deliver” (Num. 35:24-25), an assembly that judges and an assembly that delivers, thus we have twenty. [Discussion of how we know an assembly is 10.] And from where do we learn that we should bring three others [to the twenty]? By inference from what it says, “You shall not follow after the many to do evil” (Ex. 23:2), I conclude that I must be with them to do well. [Discussion about needing a majority of two to convict but only one to acquit.] The court must not be divisible equally, therefore they add to them one more; thus they are twenty three.
In other words: we start with 20, and we have to add to get an odd number, and we get a side discussion of needing a majority of two to convict -- but I don't see how that adds up to 23 when they could just add one judge to get to 21.
It looks like the interpretation hinges on "by inference from 'you shall not follow after the many to do evil'", but since there are already "many" (well, 20), I don't see how to read that as "add three more". I didn't find clarification in the g'mara.
What is the mishna's logic for adding three judges to the two assemblies of ten?