package extra; import java.io.PrintWriter; import java.util.Arrays; import java.util.Scanner; public class P3072_2 { static Scanner in; static PrintWriter out; static String INPUT = ""; static void solve() { int[] a = new int[40]; int[] h = new int[40]; for(int T = ni();T > 0;T--){ long x = nl(); // 00 * 11 if(x != 0) { for (int i = 14; i >= 0; i--) { h[i] = (int) (x % 100); x /= 100; } double t = 0; double u = 0; for (int i = 0; i < 35; i++) { for (int s = 1; s <= 10; s++) { if ((t + s) * s > u) { s--; a[i + 5] += s; u = (u - (t + s) * s) * 100 + h[i]; t = (t + 2 * s) * 10; break; } } } for (int i = 39; i >= 1; i--) { if (a[i] >= 10) { a[i] -= 10; a[i - 1]++; } } } int nzf = -1; for (int i = 0; i < 40; i++) { if (nzf == -1 && a[i] != 0) { nzf = i; } if(nzf == -1 && i == 20){ nzf = 20; } if(nzf != -1 && i <= nzf + 18){ out.print(a[i]); } if(i == 20){ out.print("."); } } out.println(); } } public static void main(String[] args) throws Exception { // int n = 1000000, m = 99999; // Random gen = new Random(); // StringBuilder sb = new StringBuilder(); // sb.append(n + " "); // for (int i = 0; i < n; i++) { // sb.append(Math.abs(gen.nextLong() % 1000000000000000000L) + " "); // } // INPUT = sb.toString(); long S = System.currentTimeMillis(); in = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(INPUT); out = new PrintWriter(System.out); solve(); out.flush(); long G = System.currentTimeMillis(); tr(G-S+"ms"); } static int ni() { return Integer.parseInt(in.next()); } static long nl() { return Long.parseLong(in.next()); } static double nd() { return Double.parseDouble(in.next()); } static void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); } }