At least 52 hours of exercise over six months best maintained cognitive performance in healthy older adults, those with mild impairment and dementia.