We built a big cube from identical size smaller cubes.1/8 of the small cubes used was red.1/4 was white and the rest were green. We used more then 300 green cubes. How many small cubes did we use if we tried to use as few as possible?

5/8 total cubes=300

so total cubes=300*8/5