#include <iostream>

using namespace std;

unsigned long long cnt;
unsigned long long fib;
unsigned long long f1=1;
unsigned long long f2=2;

int main()
{
    for (int i=0; i<100-2; i++)
    {
        fib=f2;
        f2+=f1;
        f1=fib;

        if(f2%2==0)
            cnt+=f2;

        if(cnt>4000000)
            break;
    }

    cout<< cnt+2 << endl;
    return 0;
}