#include <bits/stdc++.h>
using namespace std;
int s;
void m(int n,char a,char c,char b)
{
if(!n)return;
m(n-1,a,b,c);
++s;
m(n-1,b,c,a);
}
int main()
{
int n;
cin>>n;
m(n,1,2,3);
cout<<s;
return 0;
}
11-10
12-04
03-07
2156
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-26
1266
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)