Click the buttons.
The game ends at S=13. P blows up to infinity there. Please ignore the scientific notation errors; they're floating point rounding errors. (log(1000)=2.9999999999999996)