import java.util.Scanner

object Main {
	def main(args: Array[String]): Unit = {
	  val sc = new Scanner(System.in)
	  var list  = new Array[Int](31);
	  for(i <- 1 to 28){
	    list(sc.nextInt) = 1
	  }
	  for(i <- 1 to 30){
	    if( list(i) == 0){
	      println(i);
	    }
	  }
	}

}