Warren BuffettIf there is just one Buffett Mantra, it is definitely “be greedy when others are fearful, and fearful when others are greedy”. Late 2008 and early 2009 was a once-in-a-lifetime moment when this attitude was most profitable; anyone with cash could get stocks at rock bottom prices as fear gripped the market.

One of Warren Buffett’s contrarian purchases was a stake in Goldman Sachs (GS) in late 2008, when fear of a widespread failure of investment banks caused the massive firm’s stock to plunge from the $170s to the $50s in a matter of months. While GS has never recovered from its pre-crash highs, it’s on the way, having appreciated over 80% since late 2008. Now that a variety of economic indicators are positive for the U.S., investors have piled into the financial sector and GS is on the path to a full recovery.

Buffett, of course, stands to profit substantially. In September 2008, Buffett gave GS $5 billion in exchange for $5 billion in preferred stock and options to buy another $5 billion of shares at $115 per share. GS also agreed to a 10% dividend to Buffett on the preferred stock with the option to buy back the stock at any time for 10% above Buffett’s price (i.e., $5.5 billion). Goldman bought back the preferred stock in April 2011 in accordance with these terms.

Since the deal was made, Buffett has made about $1.3 billion in dividends, so Buffett’s total return on the preferred stock was $1.8 billion over a two and a half year period, or a total return of 36% annualized at 13.09%.

This isn’t the only income Buffett received from the deal. On Tuesday, Buffett and GS agreed to change the terms of the options side of the agreement. Now, Buffett has the right to buy 43.5 million shares for $5 billion, which would be worth $6.4 billion, for an instant $1.4 billion profit. However, Buffett has agreed to take that $1.4 billion in stock, leaving Buffett with a much smaller interest in the investment bank.

We don’t know why Buffett chose to forego the extra $5 billion stake in GS, but we can see the clear profit that value investing offers. Buffett earned a 64% return over a period of four and a half years, with his capital freed up after two and a half years. And he will be poised to profit even further on the $1.4 billion stake he will have in GS if the stock goes up. If not, Buffett can’t cry too much–he’s still up nearly $2 billion even if he loses everything on his current GS stake.

This is how value investors get rich and stay rich.