In What episode did konohamaru learn rasengan?

It didnt show an exact episode, but he used it when pain was about to kill his teacher.