How to take the pill

So, I started the pill exactly one day after my menstrual cycle, and I ended up starting my next period three days late. I have three weeks of yellow pills and one week of brown pills (week 4) and usually my period lasts 7 days. So if I end up being on my period and run out of brown pills, do I take the yellow ones again or wait until my cycle is over?