How long does each stage of a star's life last?