resolving the St. Petersburg paradox

The St. Petersburg paradox is based on one of those gambling games where the usual model of using expected gain to decide whether to play the game gives a counter-intuitive result.

In the simplest of examples, you pay some entry fee to play the game, $1 is put in a pot by a counterparty, then a coin is repeatedly flipped and the pot is doubled on every coin flip by the counterparty, until “tail” comes up. You receive the money in the pot. The expected gain of this game is infinite, regardless of the initial entry fee. So it would seem that one should always play the game, regardless of the amount demanded as entry fee. But, as the article points out, “few of us would pay even $25 to enter such a game.”
(Read the article)