How did Naruto land the finishing Rasengan on Pain? I watched Naruto's fight with Pain the other day, and I don't quite understand how Naruto managed to land a Rasengan on the Deva Path in that sequence of attacks which started with 2 Rasenshurikens.

This is what I have understood so far: Pain deflected first shuriken, then he jumped to dodge the second one flying towards his blind spot. As he landed, he was attacked by numerous Naruto clones, who were camouflaging as rocks with Henge no Jutsu (Transformation Technique), and he deflected all of them with Shinra Tensei yet again. After that, I completely lost track of what was going on and how he managed to land that Rasengan eventually.

Can anyone explain what happened with respect to the five-second interval and how Naruto managed to beat Pain?
What happened is as follows:


Naruto throws first shuriken, Shinra Tensei deflects it.
Naruto throws second shuriken, Pain dodged.
Naruto's Multiple Shadow Clone Technique attempts to attack Pain with all the clones, Shinra Tensei deflects them all.
Naruto, taking advantage of the 5 seconds it takes him to recharge, flings himself with the aid of 2 clones, and lands the Rasengan straight at him before he can use Shinra Tensei again.


Still not clear? Tell me in the comments :)