The exact code that you will need to put in will depend on how you are accumulating the value of the additional items that are in the cart. It will be up to you to get this calculation formed correctly.
The calculation that you have listed here should work if the quantity specified is for all of the items the the $_SESSION['students'] variable holds the accumulated values of the other items. Remember that the calculation is like a column in the cart and is performed for each line item in the cart, so if your session variable does not exist before the first item is in the cart it might cause problems. Doing an update to the cart display after setting this session variable should make it work though.