'use strict'

function main(input) {
  input = input.split('\n')[0].split('');
  
  let ans = 1;

  for (var i = 0; i < input.length; i++) {
    if (Number(input[i]) !== 1) {
      ans = input[i];
      break;
    }
  }

  console.log(ans);
}

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