Consider the polynomial \( P(x) = x^3 - 12x^2 + 47x - k \) which has integer roots. Find the value of \( k \) and then compute the sum of the roots. Let's think step by step and output the final answer within \boxed{}.
user