A block of mass m=0.1kg is connected to a spring of unknown spring constant k. It is compressed to a distance x from its equilibrium position and released from rest. After approaching half the distance x/2) from the equilibrium position, it hits another block and comes to rest momentarily, while the other block moves with a velocity 3m/s. The total initial energy of the spring is