import scala.math.{min,max}

object Main {
  val sc = new java.util.Scanner(System.in)
  def main(args: Array[String]) {
    val x = (1 to 28).map(_ => sc.nextInt).toSet
    val y = (1 to 30).toSet
    (y -- x).toSeq.sorted.foreach(println)
  }
}