#include <stdio.h> int main( void ) { for( unsigned n; scanf("%u",&n)==1; ) printf( "%u\n", 3*(1u<<(n-1))-2 ); }