If you've had Shout Out To My Ex by Little Mix rattling round inside your head all week, then help is finally at hand.

A new scientific study into earworms has identified ways of freeing your brain from catchy hits.

It has also explained what sort of songs are likely to get stuck there in the first place.

So if you're a frequent sufferer, you can try to avoid certain songs altogether.

The study was conducted by Dr Kelly Jakubowski from Durham University, in an investigation into breaking down the elements of an earworm.

Here's what the study recommends you do if you are being driven mad by having a song stuck in your head.

1. Listen to the song that's bugging you

Three thousand people were surveyed for the study and one of the most popular suggestions was to listen to the whole song.

It's only hooks and certain parts of songs that will get stuck in your head.

2. Listen to God Save The Queen

If you've made things worse for yourself by listening to the offending track, then here's another technique to try.

Test subjects recommend listening to an entirely different song in full and God Save The Queen was the one most people suggested to dislodge the earworm.

3. Do something entirely different

Do something, do anything - as long as it takes your mind off the song.

Dr Jakubowski's study shows that earworms hit hardest when people are bored and inactive.

So just find something to keep your grey matter busy until you're free from its grip.

Warning: Third party content might contain ads

Bad Romance by Lady Gaga was named as the worst offender (and therefore the most catchy song) most people got stuck in their heads and Dr Jakubowski says it's a simple formula to understand why.

"There are certain features of the melody that make it more prone to getting stuck in people's heads," she says.

"These musically sticky songs seem to have quite a fast tempo along with a common melodic shape and unusual intervals or repetitions like we can hear in the opening riff of Smoke On The Water by Deep Purple or in the chorus of Bad Romance by Lady Gaga."

And, the more you listen to music, the more likely it is you'll be affected.

"We already know that recent and frequent exposure to a song makes it more likely to get stuck in your head and people who sing and listen to music a lot tend to get earworms more often than others," she says.

The most troublesome earworms, as determined by the study, are as follows:

1. Bad Romance - Lady Gaga

2. Can't Get You Out Of My Head - Kylie Minogue

3. Don't Stop Believing - Journey

4. Somebody That I Used To Know - Gotye

5. Moves Like Jagger - Maroon 5

6. California Gurls - Katy Perry

7. Bohemian Rhapsody - Queen

8. Alejandro - Lady Gaga

9. Poker Face - Lady Gaga

Find us on Instagram at BBCNewsbeat and follow us on Snapchat, search for bbc_newsbeat