function main(input) {
  // 入力値の分離
  param = input.split(" ");
  var calc = 0;
  for(var i = 0; i < param.length; i++){
    calc += parseInt(param[i]);
  }
  var base = 1+2+3+4+5;
  const result = base - calc;
  console.log(parseInt(result));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));parseInt