Fit legs equals fit brain: study suggests