1.
/**
 * Angewandte Mathematik, SS11
 * Problem: 10918 Tri Tiling
 * Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=21&page=show_problem&problem=1859
 *
 * @author Unverzart Michael
 * @author Wurth Manuel
 * @version 1.0, 31/5/2011
 *
 * Method : Ad-Hoc
 * Status : Accepted
 * Runtime: 0.120
 */

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        int array[] = new int[16];
        array[0] = 1;
        array[1] = 3;
        for (int i = 2; i < 16; i++)
            array[i] = array[i - 1] * 4 - array[i - 2];

        BufferedReader reader = new BufferedReader(new InputStreamReader(
                System.in));
        while (true) {
            int n = new Integer(reader.readLine());
            if (n < 0)break;
            if (n % 2 == 1) System.out.println("0");
            else System.out.println(array[n / 2]);
        }
    }
}