Where does the excess energy go in this problem? Two identical plastelin balls were suspended on a non-extensible weightless string with the same length L, which are fixed at the same point. One of the balls was deflected 90 degrees from the vertical (see figure) and was released. To what height will the balls rise after perfectly inelastic collision?

Initially I was thinking as follows:
Let's say that the lowest point the ball can reach is a level where potential energy equals 0.
Potential energy of ball 1 fully transforms into kinetic energy a moment before interaction with ball 2. Afterwards the interaction occurs and kinetic energy of ball 1 transforms into kinetic energy of both balls and they go further together. At the highest point their kinetic energy will be 0 and their potential energy must be equal to the potential energy of ball 1 before it was released.
(a) First ball potential energy a moment after its release: U = mgL
(b) First ball kinetic energy a moment before interaction with 2nd ball: E = (mV^2)/2
(c) Both balls potential energy at the highest point after interaction: U = 2mgh (where h is to be calculated; 2m are masses of 2 identical balls)
So if we assume that a = c, then mgL = 2mgh -> L = 2h -> h = L/2
But if we solve it the right way, then we receive that h = L/4.
If we solve it by calculating the velocity of the 1st ball right before interaction, then calculating the velocity of both balls by using momentum conservation law we will find out that the kinetic energy of the first ball right before interaction is 2 times bigger than the kinetic energy of both balls right after interaction (because mass increases 2-fold but velocity decreases 2-fold).
It looks like right after the collision half of the kinetic energy is gone.
Where does the energy go or where am I wrong in my thinking? Thank you.
 A: By postulating the collision is an inelastic collision, you postulate it to not conserve mechanical energy (that's what inelastic means). As this is your postulate and you haven't set a place for the lost energy to go, formally you can't say where it goes. In the real world, inelastic macroscopic collisions dissipate energy as heat, sound, and sometimes permanent deformation/damage. The energy still exists in the universe but you can't use it for anything.
Because you've postulated that mechanical energy is not conserved, trying to solve the problem with mechanical energy conservation simply won't work.
If you postulate a perfectly inelastic collision, then you have a collision where the most kinetic energy possible is lost without violating momentum conservation. From this description, you can derive that perfectly inelastically collided bodies move with the same velocity ("together") after the collision, such that the total momentum before and after is the same. This last description is where the correct solution starts off.
