$_=<>;s/11+(01+)*/$&=~y,01,10,r.11/ge;print y/1//