At 3.79 million square miles (9.83 million km²) and with about 306 million people, the United States is the third or fourth largest country by total area, and third largest by land area and by population. The United States is one of the world's most ethnically diverse and multicultural nations, the product of large-scale immigration from many countries. The U.S. economy is the largest national economy in the world, with an estimated 2008 gross domestic product (GDP) of US $14.3 trillion (23% of the world total based on nominal GDP and almost 21% at purchasing power parity). The nation was founded by thirteen colonies of Great Britain located along the Atlantic seaboard. On July 4, 1776, they issued the Declaration of Independence, which proclaimed their independence from Great Britain and their formation of a cooperative union. The rebellious states defeated Great Britain in the American Revolutionary War, the first successful colonial war of independence. The Philadelphia Convention adopted the current United States Constitution on September 17, 1787; its ratification the following year made the states part of a single republic with a strong central government. The Bill of Rights, comprising ten constitutional amendments guaranteeing many fundamental civil rights and freedoms, was ratified in 1791. In the 19th century, the United States acquired land from France, Spain, the United Kingdom, Mexico, and Russia, and annexed the Republic of Texas and the Republic of Hawaii. Disputes between the agrarian South and industrial North over states' rights and the expansion of the institution of slavery provoked the American Civil War of the 1860s. The North's victory prevented a permanent split of the country and led to the end of legal slavery in the United States. By the 1870s, the national economy was the world's largest. The Spanish–American War and World War I confirmed the country's status as a military power. In 1945, the United States emerged from World War II as the first country with nuclear weapons, a permanent member of the United Nations Security Council, and a founding member of NATO. The end of the Cold War and the dissolution of the Soviet Union left the United States as the sole superpower. The country accounts for approximately 50% of global military spending and is a leading economic, political, and cultural force in the world.