prompt: James buys 200 lotto tickets for 2 dollars each.  Of those tickets 20% are winners.  80% of the winners are for 5 dollars. 1 ticket is the grand prize of $5,000.  The other tickets win an average of $10.  How much did he profit?
messages.content: James buys 200 lotto tickets for 2 dollars each.  Of those tickets 20% are winners.  80% of the winners are for 5 dollars. 1 ticket is the grand prize of $5,000.  The other tickets win an average of $10.  How much did he profit?
messages.role: user
messages.content: He spent 200*2=$<<200*2=400>>400
  There were 200*.2=<<200*.2=40>>40 tickets
  Of those 40*.8=32 are 5 dollar winners
  So they win 32*5=$<<32*5=160>>160
  He has 40-32=<<40-32=8>>8 other winning tickets
  Of those 8-1=<<8-1=7>>7 wins $10
  So they win 10*7=$<<10*7=70>>70
  So he won 5000+70+160-400=$<<5000+70+160-400=4830>>4830
  #### 4830
messages.role: assistant