"use strict";

const main = arg => {
	const arr = arg.trim().split(' ');
  	for (let i = 0; i < arr.length; i++) {
      if(arr[i] == 0) {
        console.log(i+1);
      }
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));  