Three boys collected marbles. Michael collected 5p marbles which was half as many as what Valen collected. Fabian collected 9 marbles less than Michael. How many marbles did they collect altogether? Give the answer in terms of p in the simplest form.