using long instead of int for counting character and lines. Required to process massive inputs.