Gary is a particle physicist and according to him only two type of particles exist in the universe i.e. A and B. He says that when n particles of type A fuses with m particles of type B, fusion results into -
1. Formation of (n+m) particles of B type. 2. All previous A type particles are eliminated. 3. All previous B type particles are converted into type A.
Gary named this process as "Abnormal Fusion". There are certain rules for this fusion, such as -
1. All the particles collide all together at once. 2. Next Fusion can occur only when previous Fusion has completed.
Initially Gary had 1 particle of each type. Since he had some urgent work he went away and a number of Fusions happened. After coming back he found that there are total 144 particles and he somehow stopped the process. Now Gary wants to know the number of "Abnormal Fusions" that took place when he was away.
Login to submit your solution