Do what the doc says. If you push it, recovery will just take longer.
And, while keeping in shape is great, keep in mind that no amount of exercise is going to make your body like it was when you were 25, especially in terms of resilience. So, don't overdo it. (I am guilty of overdoing it myself, so this is a do as I say, not do as I do post.)