59.82%

Given a number N. Write a program to the find number of diagonals possible in N sided convex polygon.

**Input:**

First line of input contains a single integer T which denotes the number of test cases. T test cases follows. First line of each test case contains a single integer N.

**Output:**

For each test case print number of diagonals possible in N sided convex polygon.

**Constraints:**

1<=T<=100

3<N<=10^{4}

**Example:
Input:**

2

5

6

5

9

akhayrutdinov | 30 |

Prateek Gole | 30 |

krushna.sharma | 29 |

StarkMaverick | 28 |

ujjwalgarg | 26 |

Lam Ngoc Pham | 405 |

All Is Well | 399 |

Divvya Sinha | 367 |

Prateek Gole | 347 |

skull tone | 310 |

akhayrutdinov | 3847 |

sanjay05 | 3366 |

Michael Riegger | 2015 |

Jasleen Kaur 2 | 2012 |

Quandray | 1949 |