Assuming your form has 3 fields, field 1, field 2 and field total, the fields "ids" are: field1, field2 and total respectively.
In your form designer, open "Custom" and drag a JavaScript element, open the settings and enable the "Load on dom ready", then add this code:
You may want to set an integer mask for your fields and set the default values to 0 based on your requirements.
2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for
goods and services provided by ChronoEngine.com