His entire purchase cost $20 - $4 = $<<20-4=16>>16.
The chocolate bars cost 5 * $2 = $<<5*2=10>>10.
The bags of chips cost a total of $16 - $10 = $<<16-10=6>>6.
Each bag of chips cost $6 / 2 = $<<6/2=3>>3.
#### 3