1/3 of the final grade will be based on homework (problem sets here), 1/3 will be based on the midterm, and 1/3 will be based on the final. Some fraction (half) of the points lost on the midterm can be made up on the final. So if your homework, combined midterm, and final grades are \(h,m,e\) each out of \(200\), then the final raw grade out of \(600\) will be
\[ h + m + f \cdot \left(1 + \frac{200-m}{400}\right).\]
So for example if you get full marks on both midterms, your final is a third of the grade, but if you get \(0\) on both midterms, you final is out of \(300\) and is a half of your final raw score.