If one root of the equation x2 + px + 12 = 0 is 4 while the equation x2 + px + q = 0 has equal roots, the value of q is