Problem hidden

COMBD - Combinatorial Sequence

Your task is to evaluate the following series for a given n

2n - ((n-1)C(1)) × 2(n-2) + ((n-2)C(2)) × 2(n-4) - ((n-3)C(3)) × 2(n-6) + ...

Where (n)C(r) denotes n choose r.

Power of 2 is always non-negative.(i.e. series terminates when either power of 2 goes negative or combinatorics becomes undefined.)

Input

First line of input contains the number of test cases (t ≤ 100000), then follows t lines, each containing the value of n (n ≤ 100000.)

Output

You should output t lines, ith line contains answer of the ith test case.

Example

Input:
2
1
2

Output:
2
3

Click here to see my set of problems at SPOJ.


Added by:devu
Date:2012-07-04
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM32-GCC ASM64 MAWK BC C-CLANG NCSHARP CPP14 CPP14-CLANG COBOL COFFEE D-CLANG D-DMD DART ELIXIR FANTOM FORTH GOSU GRV JS-MONKEY JULIA KTLN NIM OBJC OBJC-CLANG OCT PICO PROLOG PYPY PYPY3 R RACKET RUST CHICKEN SQLITE SWIFT UNLAMBDA VB.NET
Resource:Own Problem
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.