Before the 1959 revolution, Cuba was one of the richest countries in Latin America. The country's economy in the middle part of the 20th century, fuelled by the sale of sugar to the United States, had grown wealthy. Cuba ranked 5th in the hemisphere in per capita income, 3rd in life expectancy, 2nd in per capita ownership of automobiles and telephones, and 1st in the number of television sets per inhabitant. Cuba's literacy rate, 76%, was the fourth highest in Latin America although two-thirds of the people received three years of education or less; one-third never attended school and half the adult population could neither read nor write. Cuba also ranked 11th in the world in the number of doctors per capita, although there was massive inequality in the distribution of doctors; for example more than 60% of all doctors lived and worked in Havana in 1958 and even when they worked outside Havana province they typically worked in other provincial capitals.