The total mass of $100$ given weights with positive masses equals $2S$.  A natural number $k$ is called [i]middle[/i] if some $k$ of the given weights have the total mass $S$.  Find the maximum possible number of middle numbers.
To find the maximum possible number of middle numbers for \( N \) weights, we need to show that for any \( N \geq 5 \), the most middle numbers are \( N-3 \), specifically the set \(\{2, 3, \ldots, N-2\}\).

1. **Base Case Analysis:**
   - For \( N = 2 \):
     - The weights are \( \{1, 1\} \).
     - The total mass is \( 2S = 2 \).
     - The middle number is \( k = 1 \) since one weight has a total mass of \( S = 1 \).
     - Middle numbers: \(\{1\}\).

   - For \( N = 3 \):
     - The weights are \( \{1, 1, 2\} \).
     - The total mass is \( 2S = 4 \).
     - The middle numbers are \( k = 1 \) and \( k = 2 \) since one weight or two weights can have a total mass of \( S = 2 \).
     - Middle numbers: \(\{1, 2\}\).

   - For \( N = 4 \):
     - The weights are \( \{1, 1, 1, 3\} \).
     - The total mass is \( 2S = 6 \).
     - The middle numbers are \( k = 1 \) and \( k = 3 \) since one weight or three weights can have a total mass of \( S = 3 \).
     - Middle numbers: \(\{1, 3\}\).

2. **Inductive Hypothesis:**
   Assume for \( N \geq 5 \), the middle numbers are \(\{2, 3, \ldots, N-2\}\).

3. **Inductive Step:**
   - Consider \( N+2 \) weights.
   - We need to show that the middle numbers for \( N+2 \) weights are \(\{2, 3, \ldots, N-1\}\).

4. **Construction of Weights:**
   - For even \( N \geq 6 \):
     - Model: \( 1, 1, 1, 1; 2, 2; 4, 4; \ldots; 2^{N/2-2}, 2^{N/2-2} \).
     - Total mass: \( 2S = 2^{N/2} \).

   - For odd \( N \geq 5 \):
     - Model: \( 2, 2, 2; 3, 3; 6, 6; \ldots; 3 \cdot 2^{(N-1)/2-2}, 2^{(N-1)/2-2} \).
     - Total mass: \( 2S = 3 \cdot 2^{(N-1)/2} \).

5. **Verification:**
   - By induction, the middle numbers for \( N \) weights are \(\{2, 3, \ldots, N-2\}\).
   - Augmenting with the next two (equal) values to reach \( N+2 \) weights, we get the pair \(\{2, N\}\).
   - For every pair \(\{k, N-k\}\), \( 2 \leq k \leq N-2 \), for \( N \) weights, we obtain the pair \(\{k+1, N-k+1\}\), \( 3 \leq k+1 \leq N-1 \).

6. **Conclusion:**
   - The maximum possible number of middle numbers for \( N \geq 5 \) is \( N-3 \).
   - The middle numbers are \(\{2, 3, \ldots, N-2\}\).

The final answer is \( \boxed{ N-3 } \).