We study indirect democracy in which countries, states, or districts each elect a representative who later votes at a union level on their behalf. We show that the voting rule that maximizes the total expected utility of all agents in the union involves assigning a weight to each district's vote and then sticking with the status quo unless at least a threshold of weighted votes is cast for change. We analyze how the weights relate to the population size of a country and the correlation structure of agents' preferences, and then we compare the voting weights in the Council of the European Union under the Nice Treaty and the recently proposed Constitution.