Implement sum operation.