You can do this with a proportion. It takes 5/6 of a gallon to paint 1 wall and you want to know how much of a wall can you paint with 1/2 gallon. So set up the proportion:
5/6 / 1 = 1/2 / x
cross multiplying gets you 5/6x = 1/2
multiply by the reciprocal of 5/6 to isolate x - which is 6/5. 1/2 times 6/5 = 3/5
I got this answer by making a variable, x, for the number of bananas you are buying. You can use this expression for whatever number of bananas you want and it will work.
The answer to your question is 405, because look divide 324 by 4 becasue thats how many fifths are being used then multiply the answer which is 81 by 405