In the xy-plane the line x+y=k where k is a constant

in the xy-plane the line x+y=k where k is a constant is tangent to the graph of y=x^2+3x+1 what is the value of k?