import sys import numpy as np read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines nums = np.array(read().split(), np.float64)[1:] np.sqrt(nums, out=nums) K = 1<<10 high, low = np.divmod(nums, K) np.cumsum(high, out=high) np.cumsum(low, out=low) x = high * K + low print('\n'.join(map(str, x.tolist())))