To find the number of students who preferred healthy foods, we can use the ratio given in the problem. For every five students, two liked healthy foods.
First, let's determine how many groups of five students are in the 35 students surveyed:
\[ \frac{35}{5} = 7 \]
Since there are 7 groups of 5 students, we can find the number of students who prefer healthy foods by calculating \(2\) (the number who preferred healthy foods in each group) times \(7\):
\[ 2 \times 7 = 14 \]
Therefore, the number of students who preferred healthy foods is 14.