Cosimo III de ' Medici ( 14 August 1642 â `` 31 October 1723 ) was the penultimate Grand Duke of Tuscany . Cosimo III de ' Medici ( 14 August 1642 -- 31 October 1723 ) was the penultimate Grand Duke of Tuscany .