17: Critical points:

It is in M, so candidates to be checked on are 0, the critical point above, and 2R.

What is the maximum?
Note that the calculations might be a bit simpler if instead the whole height one uses h just for half of it.

Answer