That feeling helped to elect billionaires like Michael R. Bloomberg , the mayor of New York ; Silvio Berlusconi , the prime minister of Italy who last week was contesting an apparent defeat at the polls ; and Thaksin Shinawatra , who resigned as prime minister of Thailand this month .