Each triangle in this figure is an isosceles right triangle. The length of $\overline{BC}$ is 2 units. What is the number of units in the perimeter of quadrilateral $ABCD$? Express your answer in simplest radical form.

[asy]
draw((0,0)--(10,0)--(0,10)--cycle);
draw((10,0)--(0,10)--(10,20)--cycle);
draw((1,0)--(1,1)--(0,1));
draw((1,11)--(2,10)--(1,9));
label("$A$",(0,0),S);
label("$B$",(10,0),S);
label("$C$",(10,20),N);
label("$D$",(0,10),W);

[/asy]
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Each triangle in this figure is an isosceles right triangle. The length of $\overline{BC}$ is 2 units. What is the number of units in the perimeter of quadrilateral $ABCD$? Express your answer in simplest radical form.

[asy]
draw((0,0)--(10,0)--(0,10)--cycle);
draw((10,0)--(0,10)--(10,20)--cycle);
draw((1,0)--(1,1)--(0,1));
draw((1,11)--(2,10)--(1,9));
label("$A$",(0,0),S);
label("$B$",(10,0),S);
label("$C$",(10,20),N);
label("$D$",(0,10),W);

[/asy]
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
4+\sqrt{2}
Each triangle in this figure is an isosceles right triangle. The length of $\overline{BC}$ is 2 units. What is the number of units in the perimeter of quadrilateral $ABCD$? Express your answer in simplest radical form.

[asy]
draw((0,0)--(10,0)--(0,10)--cycle);
draw((10,0)--(0,10)--(10,20)--cycle);
draw((1,0)--(1,1)--(0,1));
draw((1,11)--(2,10)--(1,9));
label("$A$",(0,0),S);
label("$B$",(10,0),S);
label("$C$",(10,20),N);
label("$D$",(0,10),W);

[/asy]
train