public void solve() throws FileNotFoundException {
        Scanner in = new Scanner(new File(SourcePath.getInputPath() + "/googleCodeJam/round1B2010/C-large-practice.in"));
        PrintWriter out = new PrintWriter(SourcePath.getOutputPath() + "/googleCodeJam/round1B2010/C-large-practice-java.out");

        c = new long[501][501];
        c[0][0] = 1;
        for (int i = 1; i <= 500; i++) {
            c[i][0] = 1;
            for (int j = 1; j <= 500; j++) {
                c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % MOD;
            }
        }

        int testN = in.nextInt();
        for (int test = 1; test <= testN; test++) {
            out.print("Case #" + test + ": ");

            int n = in.nextInt();
            memo = new long[n + 1][n];
            for (long[] z : memo) {
                Arrays.fill(z, -1);
            }

            long res = 0;
            for (int i = 1; i < n; i++) {
                res = (res + calc(n, i)) % MOD;
            }
            out.println(res);
        }

        in.close();
        out.close();
    }