console.log(Math.abs(8 - require('fs').readFileSync('/dev/stdin', 'utf8').replace('\n', '').match(/0/g).length));