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

public class FileCopier {
	public static void main(String [] args) throws FileNotFoundException {
		Scanner keyboard = new Scanner(System.in);

		System.out.println("File to copy from: ");
		String infilename = keyboard.next();

		System.out.println("File to copy to: ");
		String outfilename = keyboard.next();

		Scanner infile = new Scanner(new File(infilename));
		PrintStream outfile= new PrintStream(outfilename);

		int numberOfValues = infile.nextInt();
		outfile.println(numberOfValues);			// have to copy the header as well
		outfile.println();

		for (int i = 1; i <= numberOfValues; i = i + 1) {
			double num = infile.nextDouble();
			outfile.println(num);
		}

		infile.close();
		outfile.close();

		System.out.println(numberOfValues + " values copied from " + infilename + " to " + outfilename);
	}
}
