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 Rust (1.42.0) (judge verdict: Accepted)

#![allow(unused_imports)]
// use itertools::Itertools;
use proconio::{input, marker::*};

fn main() {
    input! {
        n: usize
    };
    // arr = [2, 1]; 2.upto(90){|i| arr << (arr[i-1] + arr[i-2])}; print "[", arr.join("i64, "), "i64]"
    let arr = [
        2i64,
        1i64,
        3i64,
        4i64,
        7i64,
        11i64,
        18i64,
        29i64,
        47i64,
        76i64,
        123i64,
        199i64,
        322i64,
        521i64,
        843i64,
        1364i64,
        2207i64,
        3571i64,
        5778i64,
        9349i64,
        15127i64,
        24476i64,
        39603i64,
        64079i64,
        103682i64,
        167761i64,
        271443i64,
        439204i64,
        710647i64,
        1149851i64,
        1860498i64,
        3010349i64,
        4870847i64,
        7881196i64,
        12752043i64,
        20633239i64,
        33385282i64,
        54018521i64,
        87403803i64,
        141422324i64,
        228826127i64,
        370248451i64,
        599074578i64,
        969323029i64,
        1568397607i64,
        2537720636i64,
        4106118243i64,
        6643838879i64,
        10749957122i64,
        17393796001i64,
        28143753123i64,
        45537549124i64,
        73681302247i64,
        119218851371i64,
        192900153618i64,
        312119004989i64,
        505019158607i64,
        817138163596i64,
        1322157322203i64,
        2139295485799i64,
        3461452808002i64,
        5600748293801i64,
        9062201101803i64,
        14662949395604i64,
        23725150497407i64,
        38388099893011i64,
        62113250390418i64,
        100501350283429i64,
        162614600673847i64,
        263115950957276i64,
        425730551631123i64,
        688846502588399i64,
        1114577054219522i64,
        1803423556807921i64,
        2918000611027443i64,
        4721424167835364i64,
        7639424778862807i64,
        12360848946698171i64,
        20000273725560978i64,
        32361122672259149i64,
        52361396397820127i64,
        84722519070079276i64,
        137083915467899403i64,
        221806434537978679i64,
        358890350005878082i64,
        580696784543856761i64,
        939587134549734843i64,
        1520283919093591604i64,
        2459871053643326447i64,
        3980154972736918051i64,
        6440026026380244498i64,
    ];
    println!("{}", arr[n]);
}