Just when investors had counted Gilead Sciences (Nasdaq: GILD) down for the count, it comes roaring back.

Product sales in the third quarter were up a healthy 13% on the back of a 23% increase in sales of HIV drug Atripla. The drug is a combination of Gilead's Truvada and Bristol-Myers Squibb's (NYSE: BMY) Sustiva. Sales growth of Truvada alone has slowed considerably because the triple combination is more convenient, although Truvada sales were still up a solid 8%.

The question is: What's Gilead going to do for an encore? Truvada and Atripla will lose patent protection eventually, and the two drugs make up 75% of product sales. Gilead has tried to diversify away from HIV drugs -- it sells heart drugs Letairis and Ranexa -- but clearly, it has not had an appreciable effect.

The solution seems to be a three-pronged approach: Stick with what's working, expand into hepatitis C, and do something useful with all the cash it's generating.

In the stick-with-what's-working category, Gilead has two HIV drugs in the works. It is partnering with Johnson & Johnson (NYSE: JNJ) to combine J&J's TMC278 with Truvada. Gilead has already filed a marketing application in the European Union and expects to file in the U.S. next month, which could put the drug on the market in the second quarter of next year.

It's also developing a Quad pill that contains four medications all developed by Gilead -- no splitting revenues required. Data from the phase 3 trials testing the Quad are expected in the third and fourth quarters of next year.

On the hepatitis C front, Gilead is behind Merck (NYSE: MRK) and Vertex Pharmaceuticals (Nasdaq: VRTX), but its strength could be in its depth. Gilead has five compounds in clinical trials and another two that are almost ready to enter the clinic. If it can find a cocktail of drugs -- like it has done in HIV -- that can beat Merck's boceprevir and Vertex's telaprevir, being late to the show won't matter much.

Finally, let's not forget that Gilead is throwing off a truckload of cash. Through stock buybacks, the company has reduced its share count by 10% this year and expects to purchase another $3 billion worth the rest of the year if the share price stays down. In addition to propping up its shares, the move is helping give investors a larger share of the earnings; net income was up just 4.7%, but earnings per share jumped 15.3% because of the lower share count.

Even though it's an established drugmaker with growing sales, Gilead is quite dependant on the success of its pipeline. Such is the life of a drugmaker; the encore is always necessary to stay alive.

Interested in keeping track of Gilead as it performs its encore? Add it to My Watchlist, which will help you keep track of all our Foolish analysis on Gilead.

Gilead Sciences is a Motley Fool Stock Advisor selection. Vertex Pharmaceuticals is a Motley Fool Rule Breakers recommendation. Motley Fool Options has recommended a diagonal call position on Johnson & Johnson, which is a Motley Fool Income Investor selection. The Fool owns shares of Johnson & Johnson. Try any of our Foolish newsletter services free for 30 days.

True to its name, The Motley Fool is made up of a motley assortment of writers and analysts, each with a unique perspective; sometimes we agree, sometimes we disagree, but we all believe in the power of learning from each other through our Foolish community.

Fool contributor Brian Orelli, Ph.D., doesn't own shares of any company mentioned in this article. The Fool has a disclosure policy.