Apes in a Forest

Inside a forest, a number of apes equal in number to the square of 1/8 of the total number of apes in the pack are playing noisy games. The remaining 12 apes, who are of a more serious disposition, are on a nearby hill and are irritated by the shrieks coming from the forest. What is the total number of apes in the pack?

Bijaganita, Bhāskara II, 1150

Click here to reveal the answer