
#include <stdio.h>


int main(){
    int n,teste=1,base,i,inc;
    scanf("%d",&n);


    while(n != -1){
         base = 2;
         inc = 1;
         for(i=1; i<=n; i++){
            base += inc;
            inc *= 2;
         }


         printf("Caso %d\n",teste);
         teste++;
         printf("%d\n",base*base);

         scanf("%d",&n);
         if (n != -1)
         {
              printf("\n");
         }
    }
    return 0;
}
