### Problem

Sigma function is an interesting function in Number Theory. It is denoted by the Greek letter Sigma (σ). This function actually denotes the sum of all divisors of a number. For example σ(24) = 1+2+3+4+6+8+12+24=60. Sigma of small numbers is easy to find but for large numbers it is very difficult to find in a straight forward way. But mathematicians have discovered a formula to find sigma. If the prime power decomposition of an integer is

For some n the value of σ(n) is odd and for others it is even. Given a value n, you will have to find how many integers from 1 to n have even value of σ.

### C++ Code

```#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;

const ll maxn = 1e12 + 7;
vector<ll> v;

void init() {
for(ll i = 1; i*i <= maxn; ++i) {
v.push_back(i * i);
if(2 * i * i <= maxn)
v.push_back(2 * i * i);
}
sort(v.begin(), v.end());
v.erase(unique(v.begin(), v.end()), v.end());
}

int main() {
init();
int T, kase = 0; scanf("%d", &T);
while(T--) {
ll x; scanf("%lld", &x);
ll d = upper_bound(v.begin(), v.end(), x) - v.begin();
printf("Case %d: %lld\n", ++kase, x - d);
}
return 0;
}
```