Care to place a bet? (probability guru needed)

#1
I consider myself pretty good when it comes to math and probabilities, but this has me stumped.

It's your lucky day! A man offers you a fair coin toss and will pay you 2:1 on any money you risk. Unfortunately He only has enough time to stick around for 8 tosses and you are limited to the $1000 you currently have on you in cash. If you are able to bet a different amount on each toss, but cannot risk more than the cash you currently hold(Including winnings from prior bets), what betting strategy should you apply in order to maximize your expected value?

I might be over thinking this, but I'm not sure how to solve this without some sort of simulator. Any ideas?

Edit: I should mention that this is question is based off of a real issue I am trying to solve (not homework). Therefore I am more interested in the process of tackling a problem like this. I've tried constructing binomial trees but the ability to change "the bet" has me at a loss.
 
Last edited: