import java.io.*;

public class Exec4_8 {
  public static void main(String[] args) {
    if (args.length!=1) {
      System.out.println("Please provide a input file name in command line.");
      System.exit(-1);
    }

    try {
      BufferedReader input=new BufferedReader(new FileReader(args[0]));
      String line;
      float sum=0;
      int count=0;

      line=input.readLine();
      while (line!=null) {
        try {
          int number=Integer.parseInt(line);

          System.out.println(line);
          sum=sum+number;
          count++;
        } catch (Exception e) {
          // When input is invalid, print out an error message.
          System.out.println(line+" is not one number.");
        }

        line=input.readLine();
      }

      System.out.println("Avarage is : "+(sum/count));

      input.close();
    } catch (IOException e) {
      System.out.println("Input file not found!");
      System.exit(-1);
    }
  }
}