With increased life expectancy, many Americans plan to continue working past retirement as a way of keeping busy and staying mentally fit, according to a survey by TD Ameritrade.

The survey found that 37% of Americans in their 40s and and the same percentage of those in their 50s plan to continue working in retirement even if there is no financial need.

The top reasons they cited were to keep their mind sharp (72%), keep from being bored (67%), make ends meet financially (59%), socially interact with others (58%) and challenge themselves intellectually (46%).

This online survey, conducted in August and September by The Harris Poll on behalf of TD Ameritrade, included 2,000 U.S. adults ages 40 to 79 with at least $25,000 in investable assets. A total of 653 identified as unretirees—those who plan to continue working in retirement or went back to work after retiring.

It found that more Americans in their 40s and 50s are planning to work than those in their 60s and 70s after retiring, with 92% of those in their 40s planning to do so.

On average, those in their 40s and 50s plan to work 20 hours per week in a paid position after retiring, and those in their 70s plan to keep working 10 hours per week. But volunteer work is a viable option. Forty-six percent have volunteered or would consider volunteering at a non-profit/community center after retiring.

Many also are investigating mini-retirement breaks and “unretirement” options. In fact, 53% would rather work longer in their lifetime and have small one-year mini-retirement breaks than work without a break until retirement, and 28% have done or would consider intermittent retirement.

Fifty-five percent of unretirees plan to continue working until the end of their lives and 29% said they lost a sense of their identity when they stopped working.

In preparation for the long haul, 59% of unretirees said they reduced overall expenses to save more; 35% increased income outside of full-time job; and 27% sought help from a financial advisor on how to plan.