import java.util.Collection;
import java.util.LinkedList;

public class Wc2 {
  public static void main(final String[] args) {
    FileCopier2 fc = new FileCopier2();
    try {
      CharacterCounter cc = new CharacterCounter();
      Collection<String> cl = new LinkedList<String>();
      for (String s : args) {
        cl.add(s);
      }
      fc.cp(new StringStream(cl), cc);
      System.out.println("\t" + cc.getNumCharacters() + "\t" + args[0]);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}
