Sayyiduna Jabir bin Abdullah (may Allah be pleased with them both) narrates that the Messenger of Allah (peace and blessings be upon him) said: "When any one of you comes to the mosque while the Imam is delivering the sermon, he should perform two rak'ahs before sitting down."