To walk is good for health. Walking is good for health. Both of those are grammatically correct, but the '-ing' form is much more common in the subject position.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.