Mary has 3 more apples than Ted and 3 times as many apples as Alex. How many apples do all three of them have combined if Mary has 24 apples