Multiple switches between vegetative and reproductive growth in annual plants