Let's use the variable x to represent the total number of mangoes.
If 60% of the mangoes are green, so the other 40% are ripe mangoes.
If all the ripe mangoes and 1/5 of the green mangoes corresponds to 78 mangoes, so we can write the following equation:
Solving this equation for x, we have:
Therefore the initial amount of mangoes is 150.