function Main(input) {
    input = input.split("\n");
    for (var i = 0; i < input[0].length; i++) {
        if (input[0][i] != '1') {
            console.log(input[0][i]);
            break;
        }
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));