Three boys collected buttons. Vaidev collected 3z buttons which was one quarter as many as what Andy collected. Fred collected 5 buttons less than Vaidev. How many buttons did they collect altogether? Give the answer in terms of z in the simplest form.