#include <iostream>
using namespace std;
int main()
{
int n, i, d, nrd;
cin >> n;
int v[n];
for (i=1; i<=n; i++)
{
cin >> v[i];
nrd=0;
if (v[i]%2==0)
{
for (d=1; d<=v[i]; d++)
if (v[i]%d==0) nrd++;
v[i]=nrd;
}
}
for (i=1; i<=n; i++) cout << v[i] << " ";
return 0;
}