import java.util.HashMap;
import java.util.Map;

public class Euler951 {

    static class Key {
        int r;
        int first;
        long a;
        long b;

        Key(int r, int first, long a, long b) {
            this.r = r;
            this.first = first;
            this.a = a;
            this.b = b;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Key key = (Key) o;
            return r == key.r && first == key.first && a == key.a && b == key.b;
        }

        @Override
        public int hashCode() {
            long h = 1469598103934665603L;
            h ^= r;
            h *= 1099511628211L;
            h ^= first;
            h *= 1099511628211L;
            h ^= a;
            h *= 1099511628211L;
            h ^= b;
            h *= 1099511628211L;
            return (int) h;
        }
    }

    static long F(int n) {
        int m = 2 * n;

        Map<Key, Long> cur = new HashMap<>(2048);
        cur.put(new Key(1, 1, 2, -1), 1L);
        cur.put(new Key(0, 0, 2, -1), 1L);

        for (int len = 1; len < m; ++len) {
            Map<Key, Long> nxt = new HashMap<>(cur.size() * 2 + 16);

            for (Map.Entry<Key, Long> entry : cur.entrySet()) {
                Key key = entry.getKey();
                long ways = entry.getValue();
                int r = key.r;
                int b = len - r;

                if (r < n) {
                    long ai = (key.first == 1) ? -(key.a + 2 * key.b) : (-2 * key.a);
                    Key nk = new Key(r + 1, 1, ai, key.a);
                    nxt.put(nk, nxt.getOrDefault(nk, 0L) + ways);
                }

                if (b < n) {
                    long ai = (key.first == 0) ? -(key.a + 2 * key.b) : (-2 * key.a);
                    Key nk = new Key(r, 0, ai, key.a);
                    nxt.put(nk, nxt.getOrDefault(nk, 0L) + ways);
                }
            }
            cur = nxt;
        }

        long ans = 0;
        for (Map.Entry<Key, Long> entry : cur.entrySet()) {
            Key key = entry.getKey();
            if (key.r == n && key.a == 0) {
                ans += entry.getValue();
            }
        }
        return ans;
    }

    public static String solve() {
        return Long.toString(F(26));
    }

    public static void main(String[] args) {
        if (F(2) != 4L || F(8) != 11892L) {
            System.out.println("Validation failed");
            return;
        }
        System.out.println(solve());
    }
}
