ACan someone give me some hint how to solve it. I have tried to solve it using Sum Of Geometric Progression but it won't work. :\
DWell that won't work cuz you need to mod and it will give wrong results... well try thinking of dividing it into 2 pieces and calculating first part and you will see linkage between sum of first half and second half...