function Main(input) {
  const N = parseInt(input);
  
  const answer = [2, 1];

  for(let i = 2;  i <= N; i++) {
    answer.push(answer[answer.length - 1] + answer[answer.length - 2]);
  }

  console.log(answer[answer.length - 1]);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));