void main() {
    int n = readln.chomp.to!int;
    long[] lucas = new long[n+1];
    lucas[0] = 2, lucas[1] = 1;
    foreach (i; 2 .. n+1) {
        lucas[i] = lucas[i-1] + lucas[i-2];
    }
    lucas[n].writeln;
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;