main(require('fs').readFileSync('/dev/stdin', 'utf8').trim());
function main(chunk){
    var arr = eval("["+chunk.replace(/\n/g,',')+"]");
    for(var i=1;i<=30;i++){
        if(arr.indexOf(i) == -1){
            console.log(i);
        }
    }
}