#include<iostream>
using namespace std;
struct Cell
{
bool is;
};
int main(void)
{
int times;
int rounds, cells;
int escaped(Cell[], int);
cin>>times;
while(times--)
{
cin>>rounds;
cells = rounds;
Cell *cell = new Cell[rounds];
int n, i;
for(n = 1; n <= rounds; n++)
{
if(n == 1)
{
for(i = 0; i < rounds; i++)
{
cell[i].is = true;
}
}
else
{
for(i = 0; i < rounds; i++)
{
if((i + 1) % n == 0) cell[i].is = !cell[i].is;
}
}
}
cout<<escaped(cell, rounds)<<endl;
delete []cell;
}
return 0;
}
int escaped(Cell a[], int n)
{
int i, escaped= 0;
for(i = 0; i < n; i++)
{
if(a[i].is) escaped++;
}
return escaped;
}
using namespace std;
struct Cell
{
bool is;
};
int main(void)
{
int times;
int rounds, cells;
int escaped(Cell[], int);
cin>>times;
while(times--)
{
cin>>rounds;
cells = rounds;
Cell *cell = new Cell[rounds];
int n, i;
for(n = 1; n <= rounds; n++)
{
if(n == 1)
{
for(i = 0; i < rounds; i++)
{
cell[i].is = true;
}
}
else
{
for(i = 0; i < rounds; i++)
{
if((i + 1) % n == 0) cell[i].is = !cell[i].is;
}
}
}
cout<<escaped(cell, rounds)<<endl;
delete []cell;
}
return 0;
}
int escaped(Cell a[], int n)
{
int i, escaped= 0;
for(i = 0; i < n; i++)
{
if(a[i].is) escaped++;
}
return escaped;
}