Read a file txt and calculate the average of students grades in C#

Good morning, I’m trying to build a program in C # that will read the highest grades from a file called Grades.txt in the first step and save it in another file called Bestgrades.txt, in the second step it will calculate the average grades and save it in another AvgGrades .txt file. I am blocked, how to read the maximum and average marks? What I did was create a txt file with student id, last name and grades.

Can someone help me please?

Here is my code :

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Text;

class Projekt
    static void Main(string() args)
        string filePath = @"C:UsersDesktopGrades.txt.txt";
        List<string> lines = File.ReadAllLines(filePath).ToList();
        foreach (String line in lines)

        string oldPath = @"C:UsersDesktopGrades.txt.txt"; 
        string newpath = @"C:UsersDesktop"; ;
        string Bestgrades = "Bestgrades.txt.txt ";
        FileInfo f1 = new FileInfo(oldPath);
        if (f1.Exists)
            if (!Directory.Exists(newpath))
            f1.CopyTo(string.Format("{0}{1}{2}", newpath, Bestgrades, f1.Extension));