Exercising just twice a week is enough to reduce the risk of disease and premature death, a study has found.