import java.util.*;publicclass Main {public static void main(String[] args){
Scanner cin = new Scanner(System.in);
int n = cin.nextInt();
int sum =2;for(int i =1; i <= n; i++)
sum += Math.pow(2, i -1);
System.out.println(sum);}}
import java.util.*;publicclass Main {public static void main(String[] args){
int sum =0;for(int a =1; a <10; a++)for(int b =1; b <10; b++)for(int c =1; c <10; c++)for(int d =1; d <10; d++)if(a != b && c != d
&& a * c *(b *10+ d)== b * d *(a *10+ c)){
System.out.println(a +"/"+ b +" "+ c +"/"+ d);
sum++;}
System.out.println(sum);}}