this is a binomial distribution problem, however, I don't find the series converge meaning this is no quantitative answer to it.
here is my two cents:
if I get a tail at first throw, the max expectation is $1*1*0.5^1=$0.5; if I get it at second throw, the max expec is $2*2*0.5^2=$1...until nth throw, the max expec is $2^(n-1)*n*0.5^n, which doesn't converge. So should I bet as much as I can afford??