Thank You Andrew again.
It did not work for correctly, because it did not sum next month (jun) automatically. But from Your formula I got idea and I made some changes and now it works correctly.
This is what I made (new formula):
=IF(MONTH(A2)<>MONTH(A3),SUMPRODUCT((MONTH($A$2:$A$6)=MONTH(A2))*($B$2:$B$6)),"")
Thank You very much for idea.
Best regards Sir Vili.