#!/usr/bin/ruby                                                                                                                                   
# -*- coding: utf-8 -*-                                                                                                                           

attend = []
28.times {
  attend.push(gets.to_i)
}

1.upto(30) {|x|
  if !attend.include?(x)
    puts x
  end
}