import java.util.*;

/**
 * HJ37 统计每个月兔子的总数 - 简单
 */
public class HJ037 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            System.out.println(f1(n));
        }
        sc.close();
    }

    private static int f(int n) {
        if (n == 1 || n == 2) {
            return 1;
        }
        return f(n - 1) + f(n - 2);
    }


    private static int f1(int month) {
        List<Rabbit> rabbitList = new ArrayList<>();
        Rabbit rabbit = new Rabbit(1);
        rabbitList.add(rabbit);
        for (int i = 2; i <= month; i++) {
            int birthRabbitCount = 0;// 每个月出生的兔子个数
            for (int j = 0; j < rabbitList.size(); j++) {
                Rabbit rabbitCurrent = rabbitList.get(j);
                rabbitCurrent.month = rabbitCurrent.month + 1; // 每只兔子会成长一个月
                if (rabbitCurrent.month > 2) {
                    birthRabbitCount++;
                }
            }

            // 把每个月出生的兔子加到集合
            for (int j = 0; j < birthRabbitCount; j++) {
                Rabbit birthRabbit = new Rabbit(1);
                rabbitList.add(birthRabbit);
            }
        }
        return rabbitList.size();
    }


    public static class Rabbit {
        public int month;

        public Rabbit(int month) {
            this.month = month;
        }
    }
}