"S&M" is a song by Barbadian recording artist Rihanna from her fifth studio album, Loud (2010). It was written by Stargate, Sandy Vee and Ester Dean, with production helmed by Stargate and Vee. It was released on January 21, 2011, as the album's fourth United States single, and on February 11, 2011, as the third worldwide single. The song's conception was initiated by Dean, who developed "S&M's hook, "Na, na, na, c'mon." Dean was motivated to continue writing the lyrics based on the hook which she conceived. "S&M" is an up-tempo dance-pop and eurodance song. It samples the synth line from Depeche Mode's song "Master and Servant". The instrumentation consists of synths and keyboard sounds. "S&M" was re-released as a remix single, and featured guest vocals by American recording artist Britney Spears. It was made available to download digitally worldwide on April 11, 2011.