import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        System.out.println(solution(n));
        
    }
    
    public static int solution(int n){
        int newBorn = 1;
        int oneMonth = 0;
        int canBorn = 0;
        int inc = 0;
        for(int i = 1; i<n; i++){
            canBorn += oneMonth;
            oneMonth = newBorn;
            newBorn = canBorn;
        }
        return newBorn + oneMonth + canBorn;
    }
}