A regular octagon is formed by cutting an isosceles right triangle from each of the corners of a square with sides of length 2000. What is the length of each side of the octagon?

**Answer Choices**

A. \dfrac{1}{3}(2000)

B. 2000(\sqrt{2}-1)

C. 2000(2-\sqrt{2})

D. 1000

E. 1000 \sqrt{2}