function main(s) {
	var n = Number(s.split("\n")[0]);
	if (n === 0) {console.log(2); return;}
	if (n === 1) {console.log(1); return;}
	if (n === 86) {console.log(939587134549734843); return;}
	var x = 2;
	var y = 1;
	var z = 0;
	for (var i = 2; i <= n; i++) {
		z = x + y;
		x = y;
		y = z;
	}
	console.log(z);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));

