CA License Renewal Requirements

Hello, For CA License renewal, do I have to complete 20 hours of CPE in the first year or can I complete all 80 before my license expires in the next six months? What happens if I did not complete the 20 in the first year? How can I get my license to be in active status? Best, Debitz