      SUBROUTINE MAIN
      INTEGER GETARG, FSIZE
      LOGICAL*1 BUF(400), GETC, C
      INTEGER I, NC
      NC = 0
      I=1
23000 CONTINUE
      IF(.NOT.(GETARG(I, BUF, 400) .EQ. -1))GOTO 23003
      IF(.NOT.(I .EQ. 1))GOTO 23005
23007 IF(.NOT.(GETC(C) .NE. -1))GOTO 23008
      NC = NC + 1
      GOTO 23007
23008 CONTINUE
23005 CONTINUE
      GOTO 23002
23003 CONTINUE
      IF(.NOT.(BUF(1) .EQ. 63 .AND. BUF(2) .EQ. 0))GOTO 23009
      CALL ERROR (24Husage:  ccnt [file ...].)
      GOTO 23010
23009 CONTINUE
      IF(.NOT.(BUF(1) .EQ. 45 .AND. BUF(2) .EQ. 0))GOTO 23011
23013 IF(.NOT.(GETC(C) .NE. -1))GOTO 23014
      NC = NC + 1
      GOTO 23013
23014 CONTINUE
      GOTO 23012
23011 CONTINUE
      SIZE = FSIZE(BUF)
      IF(.NOT.(SIZE .EQ. -3))GOTO 23015
      CALL CANT (BUF)
23015 CONTINUE
      NC = NC + SIZE
23012 CONTINUE
23010 CONTINUE
23001 I=I+1
      GOTO 23000
23002 CONTINUE
      CALL PUTDEC (NC, 1)
      CALL PUTC (10)
      RETURN
      END
