Bulgaria is a developing country, with an upper-middle-income economy, ranking 56th in the Human Development Index. Its market economy is part of the European Single Market and is largely based on services, followed by industry—especially machine building and mining—and agriculture. Widespread corruption is a major socioeconomic issue; Bulgaria ranked as the most corrupt country in the European Union in 2018. The country also faces a demographic crisis, with its population shrinking annually since around 1990; it currently numbers roughly seven million, down from a peak of nearly nine million in 1988. Bulgaria is a member of the European Union, NATO, and the Council of Europe; it is also a founding member of the OSCE, and has taken a seat on the United Nations Security Council three times.