After the 50% discount, the t-shirt cost 20 * 0.5 = $<<20*0.5=10>>10.
So in all, the 4 friends spent 4 * $10 = $<<4*10=40>>40.
#### 40