#include using namespace std; int main(){ cout << fixed << setprecision(20); int N; cin >> N; if (N == 0){ cout << 4 << endl; return 0; } vector A(N + 1); A[0] = 4; A[1] = 3; for (int i = 2; i <= N; i++){ A[i] = (A[i - 1] * 19 - A[i - 2] * 12) / 4; } cout << A[N] << endl; }