#include <stdio.h>

/* count characters in input; 1st version */

main()
{
	long nc;	
	nc = 0;

	while (getchar() != EOF)
	   ++nc;
	printf("%ld\n", nc);	/* note %ld */
}




/*

 * Long integers are at least 32 bits.  On some machines, int and long are the same size. 
   On others, an int is 16 bits. hence the need for type long.

 */



