Preview:
#include <iostream>
using namespace std;
int main()
{
    long long cnt=1, bef=0,befbef=0, sum=1, a, b;
    cin>>a;
    while(sum!=a)
    {
        befbef=bef;
        bef=cnt;
        cnt=bef+befbef;
        sum++;
    }
    b=cnt+cnt+bef;
    cout<<b*2;
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter