0. There is a cost on the communications between team members, if the team is larger the cost is larger 1. There are costs on integrating (in some cases re-working) sub-par code that does not fit with the rest of the team
If the programer is just average, the impact is not that terrible but it exists, but if the programer is actually bad, I can tell you from personal experience that the costs will be very significant.
I used to work with one guy who was an absolute wizard at performance tuning. Helpless as a newborn lamb tho' when it came to setting up a new test environment, he was a 10x guy at what he did, but a 0.1x guy at "restoring last night's backup from tape" despite having all the privs he needed to do it...
A programmer who is worse than everyone else will tend to produce bugs that they themselves can't fix and also make poor design decisions. Both of these things will make things harder for the rest of the team.
In my experience there's a lot more bad programmers who produce lots of buggy code than produce low quantities of good quality code.
I have a qualm with that statement, I think. Do you have anything to back that up? It doesn't make logical sense to say that "If I have four programmers and they give me nine megawarbles of productivity, and I add a fifth programmer who can only create one megawarble of productivity, I will have a team that only generates eight megawarbles of productivity."
Too often, programmers are drawn into this romantic idea of being a 10x programmer, but I can honestly say that, in my experience, there are more 10x programmers out there than there are 10x programming problems. The IT world needs more data janitors than it needs data scientists.