MINCOUNT  Move To Invert
A triangle made of coins of height h is as follows
It has h coins at the base and h1 coins one level above base and so on.(Coins are placed as shown in the figure below)
And at the top most level there will be only one coin
Now given h the task is to invert this triangle by moving minimum number of coins.
For example when h=4 triangle is
For h=4 at least 3 coins must be moved to invert it.
Input
In the first line N will be given and then N lines follow with each line having a integer which is the height of triangle in that test case.00≤h<10^{10};
Output
For each test case output in a seperate line the minimum number of moves required to invert the triangle. Output fits in long long data type
Example
Inputt: 1 3 Output: 2
hide comments
psz2007:
20211012 08:01:49
Missing test cases now, isnt it? 

tarun_28:
20191129 15:00:07
Hint: " Read comments " ;) Last edit: 20200102 21:08:32 

nadstratosfer:
20190729 18:12:45
~30000 testcases per file. 

hunnychauhan:
20170722 11:01:42
only formula required....might be weak test cases...


viratian_070:
20170630 08:28:23
the moment u derive the formula....u get AC 

rishabhjain996:
20160826 20:04:40
dont forget n=0, caused me 2 wa :( 

Utkarsh:
20160206 05:57:03
observe the pattern 

Nallagatla Manikanta:
20160128 13:34:35
AC in one go :) 

kapoor_adhish:
20151217 15:43:10
nice problem


SangKuan:
20150705 09:14:58
hardã€‚ 
Added by:  Abhilash I 
Date:  20061216 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ERL JSRHINO 
Resource:  IIIT Hyderabad Local Programming Contest 