Brazil is the largest country in South America, bordering the Atlantic Ocean with a total land area of 3,287,357 square miles. It is home to the massive Amazon River and rainforest, which constitutes almost half of the rainforests on Earth. Brazilians are mainly descendants of colonial Portuguese settlers and immigrants from the 18th-20th centuries, with ethnic influences from Europeans, Africans and Native Americans. The core Brazilian culture stems from Portuguese influences in language, religion, music, food and communities established by immigrants from around the world. Brazil was discovered by Pedro Alvares Cabral in 1500 and gained independence from Portugal in 1822, experiencing a dictatorship and periods of military rule throughout its history.