#include<iostream> using namespace std; int hanoi(int n,char a,char b,char c){ if(n==0) return 0; else{ hanoi(n-1,a,c,b); printf("%c->%c\n",a,c); hanoi(n-1,b,a,c); } } int main() { int n; cin>>n; hanoi(n,'A','B','C'); int T=1; for(int i=1;i<=n;i++){ T*=2; } cout<<T-1; return 0; }