import sys from decimal import Decimal, getcontext getcontext().prec = 35 def main(): n = int(sys.stdin.readline()) xs = [int(sys.stdin.readline()) for _ in range(n)] sums = [] current = Decimal(0) for x in xs: current += Decimal(x).sqrt() sums.append(current) for s in sums: # Convert to string with enough precision s_str = format(s, 'f') # Convert to fixed-point string # Split into integer and fractional parts if '.' in s_str: integer_part, fractional_part = s_str.split('.') else: integer_part = s_str fractional_part = '' # Ensure fractional part has at least 18 digits fractional_part = fractional_part.ljust(18, '0')[:18] # Combine and remove trailing zeros and unnecessary decimal point result = f"{integer_part}.{fractional_part}" result = result.rstrip('0').rstrip('.') if '.' in result else result print(result) if __name__ == "__main__": main()