Please help me with the task: Equalize the weight

Hello, I’m working on this task:

Simon is almost ready to go wisit the C gang, but there is still one thing to do. It appeared that the team members have packed completely different backpacks, so that some of them are very heavy and others - too light.
Your task is to help Simon by writing a program that finds an average weight of all the backpacks and outputs it to the screen. Your program should read integers from the console, until the input is “done”. Place all the values in the int list. Afte that, find the average of all elements (their sum divided by their number) and output it to the screen.

Example:
>18
>10
>15
>13
>done
14

Here is my code:

using System.Collections.Generic;

namespace Lists
{
   public class EqualizeTheWeight
   {
       static void Main(string[] args)
       {
           List<int> weights = new List<int>();

           Console.WriteLine("Enter the weights of the backpacks (one per line):");
           string input;
           while ((input = Console.ReadLine()) != "done")
           {
               if (int.TryParse(input, out int weight))
               {
                   weights.Add(weight);
               }
               else
               {
                   Console.WriteLine($"Invalid input: '{input}'. Enter a valid weight.");
               }
           }
           double average = 0;
           if (weights.Count > 0)
           {
               average = (double)weights.Sum() / weights.Count;
           }
           Console.WriteLine($"The average backpack weight is {average:F2}");
       }
   }
}

Can anyone please help me to solve it?