#include int main(){ using namespace std; unsigned long N; cin >> N; vector v(N + 1); transform(istream_iterator(cin), istream_iterator(), begin(v) + 1, [](const unsigned long& x){return sqrtl(x);}); for(unsigned long i{1}; i <= N; i <<= 1UL)for(unsigned long j{2 * i}; j <= N; j += 2 * i)v[j] += v[j - i]; for(unsigned long i{1}; i <= N; ++i)v[i] += v[i & (i - 1)]; cout << setprecision(16) << fixed; copy(begin(v) + 1, end(v), ostream_iterator(cout, "\n")); return 0; }