The rules of the game of chance:
You roll a die 27 times, or until you win a 128-unit prize. Each roll is scored as a Loss if the die comes up 1 or 2; a Win otherwise.
The game starts off at stage 0. A Win advances to the next stage; a Loss reverts the stage to 0.
Before any roll, at your discretion you may say "Bank", which results in your winnings being increased by an amount equal to 2^(s-1) where s is the stage number, except nothing in stage 0: 1 unit if in stage 1, through 128 units in stage 8, but when you Bank, the stage reverts to 0 again.
If you get a Win in stage 8, not only is 128 added to any previous winnings, but the game ends even if 27 rolls have not yet taken place. Getting a stage-8 Win and banking are the only two ways of adding to your winnings.
If you get a Win on the 27th (last) roll you keep the value for that stage (an automatic bank after your successful roll).
Is it ever advantageous to Bank?
What's the expected value of the game, given optimal strategy?