import java.io.*; 
  
public class AvgFile 
{ 
  public static void main(String[] argv) throws Exception 
  { 
    // open 8Scores.txt for input 
    BufferedReader fin; 
    fin = new BufferedReader(new FileReader("8Scores.txt")); 
  
    // read the scores and build the sum 
    int scoreTotal = 0; 
    int i; // loop counter 
    for (i = 0; i < 8; i++) 
    { 
      int aScore; 
      aScore = new Double(fin.readLine()).intValue(); 
      scoreTotal += aScore; 
    } // for 
    fin.close(); 
  
    // calculate and print the average 
    double average = scoreTotal / 8.0; 
    System.out.println("The avg of 8 numbers is " + average); 
  } // main 
} // public class 
