s:0;while 0#(x:?read(?-,?-,0))do if?==x then dispterms(s:s-1)else s:s+1;