find the max of (i, left & right)