Napoleon surrounded himself with geniuses. 

His chief of staff Berthier: “Among Berthier’s many qualities was a diplomatic nature so finely attuned that he somehow managed to persuade his wife, the Duchess Maria of Bavaria, to share a chateau with his mistress Madame Visconti (and vice versa).”