function Main(input){
	function plus(a,b){
    a = a.split("").reverse().map(a=>~~a);
    b = b.split("").reverse().map(a=>~~a);
    var len = Math.max(a.length,b.length);
    var c = [];
    for(var i = 0; i < len;i++){
      c[i] = (a[i]||0) + (b[i]||0) + (c[i]||0);
      while(c[i] >= 10){
        c[i+1] = (c[i+1]||0) + 1;
        c[i] -= 10;
      }
    }
    return c.reverse().join("");
	}
  
  input = input.split("\n")[0]*1;
	var L = ["2","1"];
 	for(var i = 2; i <= input;i++){
  	L[i] = plus(L[i-2],L[i-1]);
  }
  return L[input];
}

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