Sunan Abi Dawud
Hadith #893
Abu Hurairah reported the Messenger of Allah (ﷺ) as saying; when you come to pray while we are prostrating ourselves, you must prostrate yourselves, and do not reckon it anything (rak’ah) he has been present at the prayer