The St. Petersburg Paradox contributed to establishing expected utility theory by demonstrating that decision making based on the expectation (expected value, or mean, average) leads to an unreasonable behavior. Although the expected value is commonly used as an optimization criterion in various fields of mathematical sciences, such paradoxical problems as arbitrariness and intransitivity have led many researchers to forsake expected utility theory in search of more useful alternatives. Here we show an analytical solution of the St. Petersburg Paradox based on the median of the probability distribution. The present method provides a reasonable solution to any related problem. The median payout of repeated games suggests a new scaling relation in the limit of a large number of repetitions, while the game has no characteristic scale in terms of expected value.