#include<bits/stdc++.h> using namespace std; long long f(long long n){ if(n==1)return 1; else if(n==2) return 2; else return 2*f(n-1)+f(n-2); } int main(){ int n; cin>>n; cout<<f(n) ; return 0; } /************************************************************** Problem: 1369 User: hulaoshi Language: C++ Result: Time Limit Exceed ****************************************************************/