(Reuters) – The S&P 500 wrapped up its third straight month of gains on a flat note on Tuesday as weaker energy shares countered a rise in safe-haven utilities.