Compute average of two numbers