import java.util.Scanner;
public class bj2747
{
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);
int n;
int i;
int a = 0, b = 1, temp;
n = scanner.nextInt();
for(i = 0; i < n - 1; i++)
{
temp = a + b;
a = b;
b = temp;
}
System.out.println(b);
scanner.close();
}
}