Inputs are actually strings, not numbers. if you want sum these two numbers
you need to convert into Integer before sum them or convert into integer while
taking input. like:
var num1 = parseInt(read.question('Enter first number:'));
var num2 = parseInt(read.question('Enter second number:'));
OR User the ParseInt method to convert into integer datatype in your Sum method.
var total=parseInt(num1)+parseInt(num2)