Stocks began a third lackluster day on Wednesday as investors remained hesitant as Greece struggled to complete a deal on reforms in Greece in exchange for a new bailout needed to avoid a messy default.

The Dow Jones industrial average gained 5.98 points, or 0.05 percent, to 12,884.18. The Standard & Poor's 500 Index rose 1.44 points, or 0.11 percent, to 1,348.49. The Nasdaq Composite Index added 5.30 points, or 0.18 percent, to 2,909.38.

(Reporting By Edward Krudy; editing by Jeffrey Benkoe)