The following game is played with a group of $n$ people and $n+1$ hats are numbered from $1$ to $n+1.$ The people are blindfolded and each of them puts one of the $n+1$ hats on his head (the remaining hat is hidden). Now, a line is formed with the $n$ people, and their eyes are uncovered: each of them can see the numbers on the hats of the people standing in front of him. Now, starting from the last person (who can see all the other players) the players take turns to guess the number of the hat on their head, but no two players can guess the same number (each player hears all the guesses from the other players).

What is the highest number of guaranteed correct guesses, if the $n$ people can discuss a common strategy?

[i]Proposed by Viktor Kiss, Budapest[/i]
1. **Understanding the Problem:**
   - We have \( n \) people and \( n+1 \) hats numbered from 1 to \( n+1 \).
   - Each person wears one hat, and one hat is hidden.
   - The people are blindfolded and then arranged in a line.
   - Each person can see the hats of the people in front of them.
   - Starting from the last person, each person guesses the number on their hat, ensuring no two people guess the same number.

2. **Strategy Discussion:**
   - The goal is to maximize the number of correct guesses.
   - Each person can see the hats of the people in front of them and hears the guesses of the people behind them.
   - The key is to use the modulo operation to ensure a systematic approach to guessing.

3. **Modulo Operation:**
   - Each person will use the sum of the numbers they see, modulo \( n+1 \).
   - The sum of all hat numbers is \( \sum_{i=1}^{n+1} i = \frac{(n+1)(n+2)}{2} \).

4. **First Person's Guess:**
   - The last person in line (Person \( n \)) can see all the hats in front of them.
   - They guess the sum of the numbers they see, modulo \( n+1 \).

5. **Subsequent Guesses:**
   - Each subsequent person (Person \( k \)) can see the hats of the people in front of them and knows the guesses of the people behind them.
   - They can determine their hat number by subtracting the sum of the numbers they see from the previous person's guess, modulo \( n+1 \).

6. **Detailed Calculation:**
   - Let \( S \) be the sum of the numbers on the hats.
   - Let \( S_k \) be the sum of the numbers on the hats that Person \( k \) can see.
   - The last person (Person \( n \)) guesses \( S_n \mod (n+1) \).
   - The second last person (Person \( n-1 \)) guesses \( (S_{n-1} - S_n) \mod (n+1) \).
   - Continue this process for each person.

7. **Guaranteed Correct Guesses:**
   - The first person (Person 1) cannot guarantee a correct guess because they have no information about the hidden hat.
   - However, every other person can guarantee a correct guess using the modulo strategy.

8. **Conclusion:**
   - The highest number of guaranteed correct guesses is \( n-1 \).

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