跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F2647. Party

  • ID: 2653
  • 传统题
  • 2000ms
  • 256MiB
  • 尝试: 0
  • AC · 已通过: 0
  • 教学难度:待分级
  • 上传者:
  • 待分类
  • 整理状态
  • 难度待定
  • 难度
  • 共享题库
  • Codeforces
  • 英文题面
  • 题目来源
  • 题面语言

Party

题目描述

B. Party
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

n people came to a party. Then those, who had no friends among people at the party, left. Then those, who had exactly 1 friend among those who stayed, left as well. Then those, who had exactly 2,3,...,n-1 friends among those who stayed by the moment of their leaving, did the same.

What is the maximum amount of people that could stay at the party in the end?

Input

The first input line contains one number t − amount of tests (1≤t≤105). Each of the following t lines contains one integer number n (1≤n≤105).

Output

For each test output in a separate line one number − the maximum amount of people that could stay in the end.

Examples
Input
1
3
Output
1

题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 2308 题。保留原作者与原赛事署名。