#include <iostream>

int main() {
    int n, teste = 1, base, i, inc;
    std::cin >> n;

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

        std::cout << "Caso " << teste << std::endl;
        teste++;
        std::cout << base * base << std::endl;

        std::cin >> n;
        if (n != -1) {
            std::cout << std::endl;
        }
    }

    return 0;
}