"use strict";

const main = (arg) => {
  const array = arg.trim().split(" ");
  for (let i = 0; i < array.length; i++) {
    let num = i + 1;
    if (num != array[i]) {
      console.log(num);
      break;
    }
  }
};
main(require("fs").readFileSync("/dev/stdin", "utf8"));
