import java.util.Scanner;
public class Solution {
public static int Fibonacci(int n) {
int first = 0, second = 1,target=0;
if (n < 2)
return n ;
for (int i = 0; i < n-1; i++)
{
target = first + second;
first = second;
second = target;
}
return target;
}
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int num=Fibonacci(n);
System.out.println(""+num);
}
}