'use strict';

const inputs = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n');

const numbers = inputs[0].split(' ').map(v => parseInt(v, 10));

numbers.forEach((v, i) => {
  if (v === 0) {
    console.log(i + 1);
  }
});