object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val S, _ = sc.next()
  val c = S.toCharArray.toList match {
    case Seq(char) => char
    case '1' :: char :: _ => char
    case char :: _ => char
  }
  println(c)
}
