Problem:
Score : 200 points

Problem Statement

It is November 18 now in Japan. By the way, 11 and 18 are adjacent Lucas numbers.

You are given an integer N. Find the N-th Lucas number.

Here, the i-th Lucas number L_i is defined as follows:

L_0=2

L_1=1

L_i=L_{i-1}+L_{i-2} (i≥2)

Constraints

1≤N≤86

It is guaranteed that the answer is less than 10^{18}.

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

Print the N-th Lucas number.

Sample Input 1

5

Sample Output 1

11

L_0=2

L_1=1

L_2=L_0+L_1=3

L_3=L_1+L_2=4

L_4=L_2+L_3=7

L_5=L_3+L_4=11

Thus, the 5-th Lucas number is 11.

Sample Input 2

86

Sample Output 2

939587134549734843

Solution in C# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;


namespace Atcoder01
{
    /*class Program
    {
        //ABC96B
        static void Main()
        {
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int N = int.Parse(Console.ReadLine());
            Array.Sort(input);
            int Ans = input[0] + input[1];
            var ans = input.Max();
            for (int i = 0; i < N; i++)
            {
                ans = ans * 2;
            }
            Console.WriteLine(ans + Ans);
        }
    }*/
    //ABC94B
    /*class Program
    {
        static void Main()
        {
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int[] gate = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int N = input[0];
            int M = input[1];
            int X = input[2];
            int cost1 = 0;
            int cost2 = 0;
            for (int i = 0;i<X;i++)
            {
                if (gate.Contains(i))
                {
                    cost1++;
                }
            }
            for (int i = X;i<= N+1;i++)
            {
                if (gate.Contains(i))
                {
                    cost2++;
                }
            }
            List<int> Answer = new List<int>();
            Answer.Add(cost1);
            Answer.Add(cost2);
            Console.WriteLine(Answer.Min());
        }
    }*/
    //ABC93B
    /*class Program
    {
        static void Main()
        {
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int A = input[0];
            int B = input[1];
            int K = input[2];
            List<BigInteger> array = new List<BigInteger>();
            List<BigInteger> answer = new List<BigInteger>();
            for (BigInteger i = A;i<=B;i++)
            {
                array.Add(i);
            }
            for(BigInteger i =A;i<A+K;i++)
            {
                answer.Add(i);
            }
            for (BigInteger i = B; i > B-K;i--)
            {
                answer.Add(i);
            }
            answer.Sort();
            IEnumerable<BigInteger> result = answer.Distinct();
            foreach (BigInteger aa in result)
            {
                if (array.Contains(aa)) {
                    Console.WriteLine(aa);
                }
            }
        }*/
    /*static void Main()
    {
        int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int A = input[0];
        int B = input[1];
        int K = input[2];
        List<int> ans1 = new List<int>();
        for (int i=A;i<A+K;i++)
        {
            ans1.Add(i);
        }
        for (int i =B-K+1;i<=B;i++)
        {
            ans1.Add(i);
        }
        ans1.Sort();
        IEnumerable<int> result = ans1.Distinct();
        foreach (BigInteger aa in result)
        {
            if (A<=aa && aa<=B) {
                Console.WriteLine(aa);
            }
        }
       }
    }*/
    //ABC92B
    /*class Program
    {
        static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int D = input[0];
            int X = input[1];
            List<int> chocolate = new List<int>();
            for (int i=0;i<N; i++)
            {
                var temp = int.Parse(Console.ReadLine());
                chocolate.Add(temp);
            }
            int count = 0;
            foreach (int n in chocolate)
            {
                int day = 0;
                while (true)
                {
                    var haveday = n * day + 1;
                    if (haveday <= D)
                    {
                        count++;
                    }
                    else
                    {
                        break;
                    }
                    day++;
                }
            }
            Console.WriteLine(count + X);
        }
    }*/
    //ABC89B
    /*class Program
    {
        static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            bool flag = false;
            char[] arare = Console.ReadLine().ToCharArray();
            foreach (char n in arare)
            {
                if (n == 'Y')
                {
                    flag = true;
                }
            }
            if (flag == true)
            {
                Console.WriteLine("Four");
            }
            else
            {
                Console.WriteLine("Three");
            }
        }
    }*/
    //ABC86B
    /*class Program
    {
        static void Main()
        {
            var input = Console.ReadLine().Split();
            var a = input[0] + input[1];
            int Ans = Convert.ToInt32(a.ToString());
            double mm = Math.Sqrt((double)Ans);
            if (mm == (int)mm)
            {
                Console.WriteLine("Yes");
            }
            else
            {
                Console.WriteLine("No");
            }
        }
    }*/
    //ABC84B
    /*class Program 
    {
        static void Main()
        {
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int A = input[0];
            int B = input[1];
            var S = Console.ReadLine();
            if (S.Length == A + B + 1)
            {
                for (int i = 0; i < S.Length; i++)
                {
                    if (A == i)
                    {
                        if (S[i] == '-')
                        {
                            var temp1 = S.Substring(0, i);
                            if (temp1.All(char.IsDigit))
                            {
                                temp1 = S.Substring(i + 1, S.Length - (i+1));
                                if (temp1.All(char.IsDigit))
                                {
                                    Console.WriteLine("Yes");
                                }
                                else
                                {
                                    Console.WriteLine("No");
                                }
                            }
                            else
                            {
                                Console.WriteLine("No");
                            }
                        }
                        else
                        {
                            Console.WriteLine("No");
                        }
                    }
                }
            }
            else
            {
                Console.WriteLine("No");
            }
        }
    }*/
    //ABC79B
    class Program
    {
        static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            List<BigInteger> ryka = new List<BigInteger>();
            ryka.Add(2);
            ryka.Add(1);
            int count = 2;
            while (count <= N)
            {
                var temp = ryka[count - 2] + ryka[count - 1];
                ryka.Add(temp);
                count++;
            }
            Console.WriteLine(ryka[N]);
        }
    }
}