user
Calculate the maximum profit that can be gained in the following stock market situation.

Company X's stock price at the opening of the market was $5 and the stock price at the close of the market was $10.


assistant
The maximum profit that can be gained in this situation is $5.