Expected Value After n Trials Suppose there is a game where a player can press a button for a chance to win a cash prize of $50,000. This can be done as many times as he/she wishes. The catch is that the chance of winning is 14/15 each time. A loss, which happens 1/15 times at random, will void all winnings and remove the player from the game. How many times should the player press the button to maximize their winnings?
This was a question brought up at dinner this evening by a family member with a slightly different game but same overall concept. It has been a while since I've done probability but I believe there is a solution to this problem. I assume that we can create a function using the expected value of each press and find the vertex to find the number of presses a player should do to maximize his/her prize. 
My guess is something like $y = ((14/15)^x*50,000) - ((1/15)^x*50,000x)$ where x is the number of trials, remembering that the player will potentially gain \$50,000 each round but also potentially lose all of their money (\$50,000x). 
Assuming there is a solution to this problem, is this the correct way to go about answering this? 
I apologize is this is completely off or a similar question has been asked, its been a few years since I've encountered a problem like this so I'm not even sure if I'm approaching/wording it the correct way.

Let $x$ be the number of times the player plans to press the button.   The probability that the player wins is ${(\tfrac{14}{15})}^x$ and the expected amount won is $x\cdot\$50000\cdot {(\tfrac{14}{15})}^x \color{silver}{+ 0\cdot \big(1-{(\tfrac{14}{15})}^x\big)}$.
You want to maximise $x\cdot {(\tfrac{14}{15})}^x$
$\dfrac{\mathsf d (x(14/15)^x)}{\mathsf d x} =0 \quad\implies\quad x= 1/\log_e(14/15) \approx 14.{\small 5} $
So with a plan of $14$ rounds, the expected return is $\$266\,448.27$.
( Of course, the actual realised return will either be $\$0.00$ or $\$700\,000$ with a probability of $0.38$.   Stop earlier and you may obtain less with more probability, stop later and you may obtain more with less certainty.   $14$ rounds is about where the product of return times probability is a maximum. )
