Alexis imagines a $2008\times 2008$ grid of integers arranged sequentially in the following way:

\[\begin{array}{r@{\hspace{20pt}}r@{\hspace{20pt}}r@{\hspace{20pt}}r@{\hspace{20pt}}r}1,&2,&3,&\ldots,&2008\\2009,&2010,&2011,&\ldots,&4026\\4017,&4018,&4019,&\ldots,&6024\\\vdots&&&&\vdots\\2008^2-2008+1,&2008^2-2008+2,&2008^2-2008+3,&\ldots,&2008^2\end{array}\]
She picks one number from each row so that no two numbers she picks are in the same column.  She them proceeds to add them together and finds that $S$ is the sum.  Next, she picks $2008$ of the numbers that are distinct from the $2008$ she picked the first time.  Again she picks exactly one number from each row and column, and again the sum of all $2008$ numbers is $S$.  Find the remainder when $S$ is divided by $2008$.
1. **Understanding the Grid and the Problem:**
   - The grid is a \(2008 \times 2008\) matrix with integers arranged sequentially from 1 to \(2008^2\).
   - Alexis picks one number from each row such that no two numbers are in the same column, and sums them to get \(S\).
   - She repeats this process with another set of 2008 numbers, ensuring no overlap with the first set, and again the sum is \(S\).

2. **Analyzing the Grid Modulo 2008:**
   - Each row \(i\) (where \(1 \leq i \leq 2008\)) contains numbers that are congruent to \(i\) modulo 2008.
   - For example, the first row modulo 2008 is \([1, 2, 3, \ldots, 2008]\), the second row is \([2009, 2010, \ldots, 4016]\) which is \([1, 2, \ldots, 2008]\) modulo 2008, and so on.

3. **Summing the Numbers:**
   - When Alexis picks one number from each row such that no two numbers are in the same column, the numbers she picks are congruent to \([1, 2, 3, \ldots, 2008]\) modulo 2008 in some order.
   - The sum of these numbers is:
     \[
     1 + 2 + 3 + \ldots + 2008 = \frac{2008 \cdot 2009}{2}
     \]
   - Calculating this sum modulo 2008:
     \[
     \frac{2008 \cdot 2009}{2} = 1004 \cdot 2009
     \]
     \[
     1004 \cdot 2009 = 1004 \cdot (2008 + 1) = 1004 \cdot 2008 + 1004 \equiv 1004 \pmod{2008}
     \]

4. **Considering the Second Set of Numbers:**
   - When Alexis picks another set of 2008 numbers, ensuring no overlap with the first set, the sum of these numbers will also be congruent to \(1004\) modulo 2008.
   - Therefore, the sum \(S\) for both sets of numbers is congruent to \(1004\) modulo 2008.

5. **Final Calculation:**
   - Since both sums are congruent to \(1004\) modulo 2008, the remainder when \(S\) is divided by 2008 is:
     \[
     \boxed{1004}
     \]