Giving notice in whilst on maternity leave

Hi, I’m due back to work in December, I know it’s a while away yet but I’ve already decided that it’s not worth me going back and paying childcare for my twins! If I give my notice in now, do I still get my statutory maternity pay up until December? How does it work?! Thanks in advance xx