Last year, all three major indexes ventured into bear territory. This kind of movement usually doesn't inspire investors to go on a stock-shopping spree. They fear declines will worsen, and therefore so will their losses.

But it's important to remember three things. First, if you haven't sold your positions, you haven't lost. Second, most quality stocks will recover over time -- so long-term investors usually triumph.

And third, there are ways to invest in a bear market that allow you to benefit in the near term and over the long term. And that's what I'm going to talk about right here. Want to know where to invest $10,000 (or even less) in a bear market? Read on.

Payments just for owning the stock

Let's talk about the kinds of investments that could bring you income almost immediately. And here, the perfect choices are dividend stocks. These are companies that offer you annual payments just for owning their shares. So even if the company's stock falls in a particular year, you still collect that passive income.

The ideal place to look for dividend stocks is in the list of Dividend Kings. These are companies that have lifted their dividend payments annually for at least the past 50 years. Why should that matter to you if you're just getting on board now? Because this shows these players care about increasing their rewards for investors. And that suggests they'll probably continue with this policy.

A great example of a Dividend King is Coca-Cola (KO 1.50%). The company pays an annual dividend of $1.84 per share, representing a yield of 2.90%. If you owned Coca-Cola stock last year, you would have beaten the bear market with an increase of more than 7%. And if you include dividend payments, your gain would have been even higher.

KO Chart

KO data by YCharts.

And if the stock price declines, dividend payments reduce your loss. That was the case with consumer staples company Kimberly Clark last year. This company also is a Dividend King.

KMB Chart

KMB data by YCharts.

Potential for gains during any market environment

A second area that could offer you gains during a bear market -- and bull markets, too -- is healthcare. That's because these players generally don't see extreme shifts in earnings due to the economy.

People need their medicines and surgical procedures no matter what the market is doing. Also, companies generally don't halt drug development during economic slowdowns, so any positive clinical-trial or regulatory news can lift these shares in any economy. Those are reasons for the stability you'll find in healthcare stocks.

Last year, healthcare players such as Johnson & Johnson (JNJ -0.69%), McKesson (MCK 0.64%), and Vertex Pharmaceuticals (VRTX -1.02%) outperformed the S&P 500.

JNJ Chart

JNJ data by YCharts.

Of course, this doesn't mean every healthcare stock will gain during a bear market. But these players often face less of a slowdown than companies in other industries. And that should at least limit share-price declines in many cases.

Lastly, during a bear market, you also should think about preparing your portfolio for the future. And that means snapping up stocks that have suffered the most but still offer solid long-term prospects. Here, a company like Amazon (AMZN -1.64%) fits the bill.

Rising inflation and the general economy weighed on Amazon last year, even pushing the company to its first annual loss in almost a decade. Meanwhile, with shares trading at their lowest in relation to sales in about five years, Amazon represented a top buy for investors. After all, the company is a leader in two high-growth markets: e-commerce and cloud computing.

How to divide up $10,000?

Now, how should you divide up your $10,000 (or any other amount) among these opportunities? That depends on your comfort with risk. If you're a very cautious investor, I would favor dividend stocks and big healthcare players. You might consider putting 80% to 90% of your investing money in these areas -- and the rest in growth stocks.

You might adjust those percentages, increasing the investment in growth stocks and decreasing in the two other areas, if you're an aggressive investor.

No matter what your investment style, though, keep in mind one crucial point: the idea of holding on to stocks for at least five years. These investments made during a bear market may limit your losses or even offer you a quick gain, but most importantly, they should set you up for growth over the long term.