How to do calculation using a dropdown menu?