Consider the polynomial function p(x)=x3+3x2-ax-12

Where a is an unknown, real number. If (x+3) is a factor of the polynomial, what is the value of a?