r = list()n = int(input())for i in range(n): x = int(input()) if(x<=2): r.append(0) else: r.append((x-1)//2) for it in r: print(it)
6 7 1 2 3 2000000000 763243547
3 0 0 1 999999999 381621773
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!