"use strict";

const main = arg => {
    const inputList = arg.trim().split("\n");
    // 回答を記述
    const XList = inputList[0].split(" ");
    XList.forEach((ele, idx) => {
        if (ele == "0") {
            console.log(idx + 1)
        }
    })
}
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));