Marge used half the $12006 for taxes, so she had 12006 / 2 = $<<12006/2=6003>>6003 left.
She used 1/3 of the leftover money on student loans, so she paid 6003 / 3 = $<<6003/3=2001>>2001.
After paying the student loans, she had 6003 - 2001 = $<<6003-2001=4002>>4002 left.
She put $1000 in savings, so she had 4002 - 1000 = $<<4002-1000=3002>>3002 left.
She invested 1000 / 5 = $<<1000/5=200>>200 in the stock market.
After investing, she had 3002 - 200 = $<<3002-200=2802>>2802 left for fun.
#### 2802