import scala.io.StdIn.readInt

object Main extends App {
  val a = new Array[Boolean](31)

  for(i<-1 to 28) {
    val n = readInt
    a(n) = true
  }
  (1 to 30).filter(a(_)==false).foreach(println)
}