Sum of 3 input fields equal to 4th input field

Sum of 3 input fields equal to 4th input field

Hi 

I am using jquery.validate.js. I am having 4 input fields. Sum of 3 input fields must be equal to 4th input field. I tried with different options but it didnt work. Is there any jquery function for this validation? Or pl. help to figure it out.Tnx.