const input = require("fs").readFileSync("/dev/stdin", "utf8")

;(input => {
    const xs = input.split(' ').map(n => n - 0)
    for (let i = 0; i < xs.length; i++) {
        if (xs[i] === 0) {
            console.log(i + 1)
        }
    }
})(input)
