You start with X dollars, where X is a whole number between 1 and 99 (inclusive). You have the option to bet any amount A, where A is also a whole number between 1 and X. The chance of winning the bet is 40%. If you win the bet, you gain the amount you bet A added to your current total. If you lose the bet, you lose the amount you bet A from your current total. This process repeats until you either reach 100 dollars or lose all your money (reaching 0 dollars). Each time, you bet any whole number A between 1 and your current total X.
(a) Calculate the strategy which maximises the probability of reaching X = 100.