'use strict'

function main(s) {

  const num = Number(s);
  const ary = ['2', '1'];

  // MAX_SAFE_INTEGERを越えるため、配列にして筆算で解く
  const add_biggerInt = (a, b) => {

    const num1 = String(a).split('').map(n => Number(n)).reverse();
    const num2 = String(b).split('').map(n => Number(n)).reverse();

    const max_digit = Math.max(num1.length, num2.length);

    // 各桁の配列
    let ans = [...Array(max_digit + 1)].fill(0);

    // 桁上がり
    const checkCarry = () => {
      for (let i = ans.length - 1; i >= 0; i--) {
        if (ans[i] >= 10) {
          const upper = Number(String(ans[i]).split('')[0]);
          const lower = Number(String(ans[i]).split('')[1]);

          ans[i - 1] += upper;
          ans[i] = lower;
        }
      }
    }

    // 筆算
    for (let i = 0; i < max_digit; i++) {
      const digit = ans.length - i - 1;

      if (num1[i] && num2[i]) {
        ans[digit] += num1[i] + num2[i];

      } else if (num1[i]) {
        ans[digit] += num1[i];

      } else if (num2[i]) {
        ans[digit] += num2[i];
      }

      checkCarry();
    }

    // 有効桁のみ抜き出す
    for (let i = 0; i < ans.length; i++) {
      if (ans[i] !== 0) {
        ans = ans.slice(i);
        break;
      }
    }

    // 文字列として返す
    return ans.join('');
  }

  for (var i = 2; i <= 86; i++) {
    ary[i] = add_biggerInt(ary[i - 1], ary[i - 2]);
  }

  const answer = ary[num];

  console.log(answer);
}

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