Canada /ˈkænədə/ is a country in North America consisting of 10 provinces and 3 territories. Located in the northern part of the continent, it extends from the Atlantic to the Pacific and northward into the Arctic Ocean. At 9.98 million square kilometres in total, Canada is the world's second-largest country by total area, and its common border with the United States is the world's longest land border shared by the same two countries.The land that is now Canada has been inhabited for millennia by various Aboriginal peoples. Beginning in the late 15th century, British and French colonies were established on the region's Atlantic coast. As a consequence of various conflicts, the United Kingdom gained and lost North American territories until left in the late 18th century with what mostly comprises Canada today. Pursuant to the British North America Act, on July 1, 1867 three colonies joined to form the autonomous federal dominion of Canada. This began an accretion of provinces and territories to the new self-governing dominion. In 1931 Britain granted Canada full independence in most matters with the Statute of Westminster 1931. The last ties were dissolved in 1982 with the Canada Act 1982.Canada is a federal parliamentary democracy and a constitutional monarchy, with Queen Elizabeth II as its head of state. Canada is a member of the Commonwealth of Nations. The country is officially bilingual at the federal level. It is one of the world's most ethnically diverse and multicultural nations, the product of large-scale immigration from many countries, with a population of approximately 35 million as of December 2012. Its advanced economy is one of the largest in the world, relying chiefly upon its abundant natural resources and well-developed trade networks. Canada's long and complex relationship with the United States has had a significant impact on its economy and culture.Canada is a developed country and one of the wealthiest in the world, with the eighth highest per capita income globally, and the eleventh highest ranking in the Human Development Index. It ranks among the highest in international measurements of education, government transparency, civil liberties, quality of life, and economic freedom. Canada's participation in economic international and intergovernmental institutions or groupings includes the G8 (Group of Eight); the Group of Ten (economic); the Group of Twenty (G-20 major economies); the North American Free Trade Agreement; and the Asia-Pacific Economic Cooperation forum. Canada's alliances include the North Atlantic Treaty Organization (NATO).