Find the maximum profit with a cooldown period of 1 day after selling (cannot buy the next day after selling).
(holding stock)
(just sold)
(can buy)
Initialize state machine