	program removedupes
	character*80 line
	character*80 line2
	logical doneit
	doneit=.false.
	open(unit=1,status='old',carriagecontrol='list')
	open(unit=2,status='new',carriagecontrol='list')
1	format(a75)
	read(1,1,end=99) line
10	read(1,1,end=99) line2
	if (line2.ne.line) then
	  doneit=.false.
	  line=line2
	else
	  if(.not.doneit) then
	    write(2,*) line
	    doneit=.true.
	  end if
	  write(2,*) line2
	  idup=idup+1
	end if
	go to 10
99	close(1)
	close(2)
	type *,idup
	end
