function Main(input) {
  for (var i = 1; i <= 3; i++) {
    if (input.indexOf(i) === -1) {
      console.log(i);
      return;
    }
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n").map(Number));