
import java.util.Scanner;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;

class Feb19 {
	public static void main(String[] args) {

		// read data from scores.txt

		Scanner fin = null;

		try {
			fin = new Scanner(new File("scores.txt")); 
		} 
		catch(FileNotFoundException e) {
			System.out.println("File was not found");
			return;	
		}
	
		int numValues = fin.nextInt();
		int[] arr = new int[numValues];

	
		for(int i = 0; i < numValues; i++) {
			int value = fin.nextInt();
			arr[i] = value;
		}

		// write contents of array to scores.bkup

		PrintWriter pw = null;

		try {
			pw = new PrintWriter(new File("scores.bkup"));
		}
		catch(FileNotFoundException e) {
			System.out.println("File not found");
			return;
		}	

		pw.println(arr.length);
		for(int i = 0; i < arr.length; i++) {
			pw.print(arr[i] + " ");
		}

		pw.close();

		printArray(arr);

		int min = arr[0];

		for(int i = 1; i < arr.length; i++) {
			if(arr[i] < min) {
				min = arr[i];
			}
		}
	
		System.out.println("Min: " + min);	

	}

	static void printArray(int[] array) {
		for(int i = 0; i < array.length; i++) {
			System.out.print(array[i] + " ");
		}
		System.out.println();
	}

} // end of class
