Thailand is governed under the constitution of 2007, adopted after the 2006 coup. The king is the head of state. The prime minister, who is the head of government, is elected by the House of Representatives and cannot serve more than eight consecutive years in the post. The National Assembly consists of the Senate, whose 150 members serve six-year terms, and the House of Representatives, whose 500 members serve four-year terms. Senators are popularly elected (76) or chosen by a panel of judges and the heads of independent national oversight bodies. Representatives are elected from constituencies (375) or on a proportional basis. Adminstratively the country is divided into 76 provinces.