An expression, which when divided by (x+1) gives (x2−x+1) as quotient and 3 as remainder is equal to: