Two squids are forced to participate in a game. Before it begins, they will be informed of all the rules, and can discuss their strategies freely. Then, they will be locked in separate rooms, and be given distinct positive integers no larger than $2023$ as their IDs respectively. The two squids then take turns alternatively; on one's turn, the squid chooses one of the following:
 
    1.  announce a positive integer, which will be heard by the other squid;
    2.  declare which squid has the larger ID. If correct, they win and are released together; otherwise, they lose and are fried together.

Find the smallest positive integer $N$ so that, no matter what IDs the squids have been given, they can always win in a finite number of turns, and the sum of the numbers announced during the game is no larger than $N$.

To solve this problem, we need to find the smallest positive integer \( N \) such that no matter what IDs the squids have been given, they can always win in a finite number of turns, and the sum of the numbers announced during the game is no larger than \( N \).

1. **Base Case:**
   - For \( n = 2 \), the squids can always win without announcing any numbers. Since the IDs are distinct, one squid will have ID 1 and the other will have ID 2. The squid with ID 2 can declare that they have the larger ID and win immediately. Thus, the sum of the numbers announced is 0.

2. **Inductive Hypothesis:**
   - Assume that for \( n = 2^k \), the squids can always win with the sum of the numbers announced being no larger than \( k-1 \).

3. **Inductive Step:**
   - We need to show that for \( n = 2^{k+1} \), the squids can always win with the sum of the numbers announced being no larger than \( k \).
   - Consider the first squid, who has some number \( A \). If \( A = 1 \) or \( A = 2^{k+1} \), the squid can immediately declare the larger ID and win.
   - Otherwise, we divide the range \( [1, 2^{k+1}] \) into \( k \) ranges of size \( 2^i \) for \( 1 \leq i \leq k \):
     - \( [2, 2^{k-1}+1] \rightarrow 1 \)
     - \( [2^{k-1}+2, 2^{k-1}+2^{k-2}+1] \rightarrow 2 \)
     - Continue this pattern until all ranges are assigned.
   - Based on which range \( A \) falls into, the first squid announces the assigned number. By the induction hypothesis, the remaining numbers can be handled with a sum of \( (k-i-1) + i = k-1 \).

4. **Bound:**
   - We need to show that \( n = 2^k + 1 \) requires at least \( k \).
   - For \( k = 1 \), this is obviously true.
   - Suppose \( 2^k + 1 \) can be done with \( k-1 \). Then in this strategy, we have \( f(1) + f(2) + \cdots + f(k-1) = 2^k + 1 \).
   - There must be some \( i \) for which \( f(i) \geq 2^{k-i} + 1 \). This implies that \( n = 2^{k-i} + 1 \) can be done with \( k-i-1 \), which is a contradiction.

Thus, the smallest positive integer \( N \) such that the sum of the numbers announced during the game is no larger than \( N \) is \( \log_2(n) - 1 \).

The final answer is \( \boxed{ \log_2(n) - 1 } \).