Authentic Supplication Number 059.

He (the Prophet) said: "When the prayer is called to, the shaytan goes away and passes wind with noise during his flight in order not to hear the Athan, when the Athan has ended he comes forth. Then when the Iqamah call is pronounced, he goes away, when the Iqamah call has ended, he comes forth, till he crosses between a person and himself. Then he says: Remember so, remember so, whereas prior to that he did not recall [the matter] to mind, until the man would become not knowing as to how much he has prayed".

Reporters.
Agreed upon by Bukhari and Muslim, and Al-Albani included this hadeeth in The Authentic of Good Sayings as #52.