You are given an odd number $n\ge 3$. For every pair of integers $(i, j)$ with $1\le i \le j \le n$ there is a domino, with $i$ written on one its end and with $j$ written on another (there are $\frac{n(n+1)}{2}$ domino overall). Amin took this dominos and started to put them in a row so that numbers on the adjacent sides of the dominos are equal. He has put $k$ dominos in this way, got bored and went away. After this Anton came to see this $k$ dominos, and he realized that he can't put all the remaining dominos in this row by the rules. For which smallest value of $k$ is this possible? 

[i]Oleksii Masalitin[/i]
To solve this problem, we need to determine the smallest value of \( k \) such that after placing \( k \) dominos, it becomes impossible to place the remaining dominos in a row according to the given rules. The answer is given as \( \frac{3n-5}{2} \). Let's break down the solution step by step.

1. **Construction of a Sequence:**
   We start by constructing a sequence of dominos that demonstrates the answer. Consider the sequence:
   \[
   [n,1], [1,2], [2,3], [3,1], [1,4], [4,5], [5,1], \ldots, [1,n-3], [n-3,n-2], [n-2,1], [1,n-1]
   \]
   This sequence works because \( n \) is odd, and the only remaining domino with \( 1 \) is \([1,1]\), which cannot be placed by Anton.

2. **Suppose \( k < \frac{3n-5}{2} \):**
   Let a domino be *bad* if it has the same number on both ends, and all other dominos be *good*. First, remove all bad dominos in Amin's path. Let \( k' \) be the number of remaining dominos, so \( k' < \frac{3n-5}{2} \).

3. **Graph Representation:**
   The sequence of good dominos can be represented as a path on \( K_n \), the complete graph on \( n \) vertices. Let the set of edges left after Amin creates a sequence be \( G \). We need to show that Anton can create an Eulerian path on \( G \) (excluding bad dominos for now), starting on the vertex \( v_f \) where Amin finished.

4. **Lemma: \( G \) is Connected:**
   - **Proof by Contradiction:**
     Suppose \( G \) is not connected. Let \( x \) be the number of vertices in one connected component. Then at least \( x(n-x) \) edges must be removed, as these are edges between different connected components.
     - For \( x = 2 \) or \( x = n-2 \), note that \( k' \geq x(n-x) = 2(n-2) \geq \frac{3n-5}{2} \) since \( n \geq 3 \).
     - \( x(n-x) \) increases for \( x < \frac{n}{2} \) and decreases for \( x > \frac{n}{2} \). For \( 2 \leq x \leq n-2 \), \( k' \geq x(n-x) \geq \frac{3n-5}{2} \).
     - The only remaining cases are \( x = 1 \) or \( x = n-1 \). Here, one connected group has \( n-1 \) vertices while the other has 1 vertex \( v \). Amin's path would have length \( k_{min} = \frac{3}{2}(n-1) - 1 = \frac{3n-5}{2} \), so \( k' \geq k_{min} = \frac{3n-5}{2} \).

   Since \( k' < \frac{3n-5}{2} \), \( G \) must be connected. \(\blacksquare\)

5. **Existence of Eulerian Path:**
   - All vertices in \( K_n \) have even degree as \( n-1 \) is even. Amin's path ensures all vertices have even degree except the first and last vertex \( v_i \) and \( v_f \).
   - By Euler's Theorem, for any connected graph with all even degrees, there exists an Eulerian cycle. If \( v_i \) and \( v_f \) are the same vertex, we can use this theorem directly.

6. **Extension of Euler's Theorem:**
   - **Claim:** For any connected graph \( G \) with all even degrees except for two vertices \( x \) and \( y \) that have odd degrees, there exists an Eulerian path from \( v_x \) to \( v_y \).
   - **Proof:**
     - **Case 1:** \( e_{v_x,v_y} \) is not in \( G \). Adding \( e_{v_x,v_y} \) to \( G \) to get \( G' \), we have a Eulerian cycle on \( G' \). Removing \( e_{v_x,v_y} \) gives a Eulerian path between \( v_x \) and \( v_y \).
     - **Case 2:** \( e_{v_x,v_y} \) is in \( G \). Removing \( e_{v_x,v_y} \) from \( G \) to get \( G' \), which has all even degrees. If \( G' \) is connected, we have a Eulerian cycle on \( G' \). Shifting along the cycle to start and end at \( v_x \) and then adding \( e_{v_x,v_y} \) at the end gives a Eulerian path from \( v_x \) to \( v_y \).
     - If \( G' \) is not connected, it forms 2 connected components where \( v_x \) and \( v_y \) are in different components. Each component has a Eulerian cycle. Combining these cycles with \( e_{v_x,v_y} \) gives a Eulerian path in \( G \). \(\blacksquare\)

7. **Adding Back Bad Dominos:**
   Since \( G \) is connected, for any number \( i \) with \( 1 \leq i \leq n \), Anton will have at least one good domino \( d_i \) remaining with \( i \) as one of its numbers. Adding back Amin's bad dominos, Anton can place any bad dominos that Amin has not already placed by adding them between corresponding good dominos.

Thus, the minimum value of \( k \) is indeed \( \frac{3n-5}{2} \).

The final answer is \( \boxed{ \frac{3n-5}{2} } \).