//这里填你的代码^^
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
inline LL solve()
{
LL res = 0;
int n;
cin >> n;
int p = 1;
while (n / p)
{
int pr = n / (n / p);
res += (pr - p + 1LL) * (n / p);
p = pr + 1;
}
return res;
}
int main()
{
int t = 1;
cin >> t;
for (int i = 1; i <= t; i ++ )
printf("Case %d: %lld\n",i,solve());
return 0;
}
//注意代码要放在两组三个点之间,才可以正确显示代码高亮哦~