If anyone obtains a rak'ah in the prayer (along with the imam), he has obtained the whole prayer.
Sunan Abi Dawud Book 2, Hadith 732