Swiss cyclist Stefan Kung won stage 18 of the Vuelta a Espana, while Enric Mas maintained his lead in the overall classification.