'use strict'

function main(inp) {
  inp = inp.trim().split('\n');
  let ans = 0
  for (let i = 1; i <= 3; i++) {
    if (inp.indexOf(String(i)) === -1) ans = i
  }
  console.log(ans)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
