import java.util.*;
public class Main {
public static void main(String args[]) {
// Your Code Here
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
tower(n,“T1”,“T2”,“T3”);
int steps=(int)Math.pow(2,n)-1;
System.out.println(steps);
}
public static void tower(int n,String from,String to,String ex){
if(n==1){
System.out.println("Move disk 1th from “+from+” to rod " + to);
return;
}
tower(n-1,from,ex,to);
System.out.println("Move disk "+n+"th from "+from+" to rod " + to);
tower(n-1,ex,to,from);
}
}