import java.io.*;

public class readCounterFile
{
	public static void main(String[] args)
	{
	try
		{
			DataInputStream dis = new DataInputStream( new FileInputStream( "counter") );
			System.out.println( dis.readInt() );
			dis.close();
		} //try
		catch (FileNotFoundException fnfe)
		{
			System.out.println("file counter could not be opened!\n"+fnfe.toString()+"\n"+fnfe.getMessage() );
		} //catch
		catch (IOException ioe)
		{
			System.out.println("an IOException occurred!\n"+ioe.toString()+"\n"+ioe.getMessage() );
		} //catch
	} //end main()
} //end class readCounterFile	