using System; using System.Collections.Generic; namespace HJ37 { internal class Program { static void Main(string[] args) { var inputStr = Console.ReadLine(); int n = int.Parse(inputStr); //三个月以上的兔子 int a = 1; //二个月的兔子 int b = 0; //一个月的免子 int c = 0; for (int i = 3; i <= n; i++) { //下个月b只二个月的将长成三个月 a += b; //下个月c只一个月的将长成二个月 b = c; //下个月a只三个月的生出a只一个月的 c = a; } int sum = a + b + c; Console.WriteLine(sum); } } }