An n-folding process on a rectangular piece of paper with sides aligned vertically and horizontally consists of repeating the following process n times:
i. Take the piece of paper and fold it in half vertically (choosing to either fold the right side over the left, or the left side over the right).
ii. Rotate the paper 90^{\circ} degrees clockwise.
A 10-folding process is performed on a piece of paper, resulting in a 1-by-1 square base consisting of many stacked layers of paper. Let d(i, j) be the Euclidean distance between the center of the i th square from the top and the center of the j th square from the top before the paper was folded. Determine the maximum possible value of \sum_{i=1}^{1023} d(i, i+1).