The Prophet (ﷺ) said the salam, then he spoke, then he performed two prostrations of forgetfulness. Sunan an-Nasa'i Book 13, Hadith 151