To find out how many apples will remain after John takes all of them and gives 8 away, we first need to determine how many apples Joshua has.
Mary has 24 apples, and Joshua has 156 more than Mary:
\[ \text{Joshua's apples} = 24 + 156 = 180 \]
Now, we add the apples of both Mary and Joshua:
\[ \text{Total apples} = 24 + 180 = 204 \]
If John takes all the apples (204 apples) and then gives away 8 apples, we subtract 8 from the total:
\[ \text{Remaining apples} = 204 - 8 = 196 \]
So, the number of apples that will remain is 196.