Ren has recently created a website, Ternary Search, which he intends on turning into the premier platform for competitive programmers to talk about anything.
In order to facilitate conversation between different users, Ren is working on a new feature called "friends". The feature will allow two distinct users to be friends. Ren is working on a prototype of this feature right now, so at present, all users are friends with Ren, and these are the only friendships present on the platform.
Including Ren, there are ~N~ users on the platform. Ren eventually wants to track a metric which he calls the "lonely user" metric, which is a count of how many users have exactly one friend. With the prototype the way it is now, how many users are lonely users?
~1 \le T \le 10^4~
~1 \le N \le 10^9~
The first line contains a single positive integer ~T~, the number of test cases.
~T~ lines follow, each line containing a single positive integer ~N~, the number of users presently on the platform.
Output ~T~ lines. On the ~i~th line, output the number of lonely users for the ~i~th test case.
3 1 10 100
0 9 99