A wagering game played by a player includes a set of game participants, an identification number assigned to each of the game participants, and a game number. The player places a wager based on the game number, and a ranking order of the game participants is determined, such as by a race. The sum of the identification numbers of a subset of the game participants is calculated, the subset of game participants having a predetermined number of game participants selected on the basis of the ranking order of the game participants. Whether the player's wager is a winning wager is determined by comparing the sum to the game number. The wagering game may be implemented as an electronic game.