Pay a moderate bit of attention during lecture, then review before the exam by reading only the chapter summaries. It also really depends a lot on the subject. You should never get in the situation where you need to rely on a bunch of other procrastinators to help bail you out.
Study for a week beforehand.
Or two weeks.
Or you could just study properly the entire semester.