In the diagram, $\triangle PQR$ is isosceles.  What is the value of $x$? [asy]
draw((0,0)--(3,6)--(6,0)--cycle);
draw((7,-2)--(6,0)--(8,0));
label("$Q$",(0,0),W);
label("$R$",(6,0),SW);
label("$P$",(3,6),N);
label("$x^\circ$",(6.5,0),SE);
label("$40^\circ$",(3,5.2),S);
draw((1.3,3.1)--(1.7,2.9));
draw((4.3,2.9)--(4.7,3.1));
[/asy]
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
In the diagram, $\triangle PQR$ is isosceles.  What is the value of $x$? [asy]
draw((0,0)--(3,6)--(6,0)--cycle);
draw((7,-2)--(6,0)--(8,0));
label("$Q$",(0,0),W);
label("$R$",(6,0),SW);
label("$P$",(3,6),N);
label("$x^\circ$",(6.5,0),SE);
label("$40^\circ$",(3,5.2),S);
draw((1.3,3.1)--(1.7,2.9));
draw((4.3,2.9)--(4.7,3.1));
[/asy]
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
70
In the diagram, $\triangle PQR$ is isosceles.  What is the value of $x$? [asy]
draw((0,0)--(3,6)--(6,0)--cycle);
draw((7,-2)--(6,0)--(8,0));
label("$Q$",(0,0),W);
label("$R$",(6,0),SW);
label("$P$",(3,6),N);
label("$x^\circ$",(6.5,0),SE);
label("$40^\circ$",(3,5.2),S);
draw((1.3,3.1)--(1.7,2.9));
draw((4.3,2.9)--(4.7,3.1));
[/asy]
train