Americans spent $5.4 billion on legal medical and recreational marijuana last year, according to new estimates from ArcView Market Research and New Frontier Data, two marijuana industry market research groups.

The total includes over $1 billion in medical marijuana sales in California, nearly $1 billion in legal marijuana sales in Colorado, and more than a half-billion dollars in sales in Washington state.

To put that $5.4 billion number in perspective, that’s more money than the $4.9 billion Americans spent on Doritos, Cheetos and Funyuns combined in 2015, according to market research firm Euromonitor.

With $5.4 billion, you can get America legally stoned for a year. Or you could have used the money to send the New Horizons probe to Pluto, the Curiosity rover to Mars, and had enough money left over to purchase the entire output of the Cheescake Factory for a year.

Keep in mind that $5.4 billion represents only legal marijuana sales. Illegal sales still account for considerably more than that, although it’s hard to know just how much.

In 2012, drug policy experts Jonathan Caulkins, Angela Hawken, Beau Kilmer and Mark Kleiman estimated the total market value of legal and illegal marijuana sales to be in the $15 billion to $30 billion range.

ArcView estimates that the legal sales are going to grow at an annual rate of about 30 percent over the next five years as more states jump on the legalization bandwagon.

Vermont might be the next to do so if its legislature passes a legalization bill this year. Voters in California, Nevada, Massachusetts and a handful of other states will decide whether to legalize marijuana this fall.

A 30 percent annual growth would put the legal marijuana industry at something like $22 billion in annual revenue by 2020, according to ArcView.

The group is encouraging investors to jump in: “Legalization of cannabis is one of the greatest business opportunities of our time, and it’s still early enough to see huge growth,” they write in the introduction to their report.

But as they also note, plenty of challenges to the industry remain. First and foremost is the vast and growing disconnect between federal policy, under which marijuana is 100 percent illegal, and laws in the states that have legalized it.

Because of federal restrictions, marijuana businesses don’t have access to banks. They can’t take advantage of the tax breaks other industries enjoy. The threat of raids by overzealous drug cops is present, despite congressional efforts to curtail these actions.

Because of these risks, investors have been timid, and marijuana business stocks were down sharply last year. An index of 10 marijuana companies’ stocks was down a whopping 44 percent in 2015, according to ArcView. The S&P 500 was essentially flat over the same period.