a championship hold Berland n player participate the player number a_i a_i ge 1 tokensthe championship consist n1 game play accord follow rule game random player nonzero tokens select player token consider winner game case tie winner choose randomly win player take loser token the player nonzero tokens winner championshipAll random decision championship equally probable independentlyfor example n4 1 2 4 3 option game option game fourth player select the fourth player tokens take player token now 0 2 4 4 second game fourth player select they number token random way player winner now 0 2 8 0 game second player select the player token take second player token now 0 0 10 0 player declare winner championship championship winner receive personalized prize therefore judge want know advance player chance win ie nonzero probability win championship you ask find player