In a talent competition, half of the contestants are eliminated in each round. At the end of the nth round, 32 contestants remain. If there were 1,024 contestants at the start of the competition, what is the value of n?