What is the sum of all elements in the set a = {x ︱ X & # 178; - (a + 2) x + A + 1 = 0, X ∈ r}

What is the sum of all elements in the set a = {x ︱ X & # 178; - (a + 2) x + A + 1 = 0, X ∈ r}

A={x|x²-(a+2)x+a+1=0,x∈R}
x²-(a+2)x+a+1=0
(x-a-1)(x-1)=0
x=a+1,x=1
So a = {a + 1,1}
The sum of all elements is a + 2