Jeff got 2n real numbers a1, a2, ..., a2n as a birthday present. The boy hates non-integer numbers, so he decided to slightly "adjust" the numbers he's got. Namely, Jeff consecutively executes n operations, each of them goes as follows:

  * choose indexes i and j (i ≠ j) that haven't been chosen yet; 
  * round element ai to the nearest integer that isn't more than ai (assign to ai: ⌊ ai ⌋); 
  * round element aj to the nearest integer that isn't less than aj (assign to aj: ⌈ aj ⌉). 



Nevertheless, Jeff doesn't want to hurt the feelings of the person who gave him the sequence. That's why the boy wants to perform the operations so as to make the absolute value of the difference between the sum of elements before performing the operations and the sum of elements after performing the operations as small as possible. Help Jeff find the minimum absolute value of the difference.

Input

The first line contains integer n (1 ≤ n ≤ 2000). The next line contains 2n real numbers a1, a2, ..., a2n (0 ≤ ai ≤ 10000), given with exactly three digits after the decimal point. The numbers are separated by spaces.

Output

In a single line print a single real number — the required difference with exactly three digits after the decimal point.

Examples

Input

3
0.000 0.500 0.750 1.000 2.000 3.000


Output

0.250


Input

3
4469.000 6526.000 4864.000 9356.383 7490.000 995.896


Output

0.279

Note

In the first test case you need to perform the operations as follows: (i = 1, j = 4), (i = 2, j = 3), (i = 5, j = 6). In this case, the difference will equal |(0 + 0.5 + 0.75 + 1 + 2 + 3) - (0 + 0 + 1 + 1 + 2 + 3)| = 0.25. 
import java.util.*; 
import java.io.*;




public class A2 {
/*

 */
    public static BR in;
    public static LR lin;
    public static PrintWriter out;
    public static PrintWriter fout;
    static {
        try {
            in = new BR();
            out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out  ) ) );
            fout = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream("output.txt") ) ) );
        }
        catch (Exception e){
            
        }
    }
    
    public static boolean bg = true;
    public static void main(String[] args) throws Exception {
        s1();
        out.close();
    }
    
    private static void s1() throws Exception {
        int n1 = in.ni();
        double[] vals = in.ndl(2*n1);
        int end = n1;
        int empty = 0;
        double k1 = 0;
        for (double e: vals){
            if (Geo.comp(e, Math.floor(e)) == 0){
                empty++;
            }
            else {
                k1 += e-Math.floor(e);
            }
        }
        double fin = Double.MAX_VALUE;
        double rawDiff = Math.abs(k1 - end);
        for (int i = 0;i<=empty && i<=n1; i++){
            double temp = n1 - i - k1;
            temp = Math.abs(temp);
            if (temp < fin){
                fin = temp;
            }
        }
        pn(String.format("%.3f", fin) );
    }
    static C1 c1 = new C1();
    static class C1 implements Comparator<Double> {
        @Override
        public int compare(Double arg0, Double arg1) {
            double k1 = arg0;
            double v1 = Math.ceil(k1)-k1;
            v1 += Math.floor(k1)-k1;
            double k2 = arg1;
            double v2 = Math.ceil(k2)-k2;
            v2 += Math.floor(k2)-k2;
            if (v1 - v2 > 0) return 1;
            if (v1 - v2 < 0) return -1;
            return 0;
        }
    }
    
    private static void pn(Object... o1) {
        for (int i = 0; i < o1.length; i++) {
            if (i != 0) out.print(" ");
            out.print(o1[i]);
        }
        out.println();
    }

    private static class Geo {
        public static double eps = 1e-8;

        public static int sign(double n1) {
            if (Math.abs(n1) <= eps) return 0;
            if (n1 > 0) return 1;
            return -1;
        }

        public static int comp(double n1, double n2) {
            return sign(n1 - n2);
        }
    }
    private static class LR {
    }

    private static class BR {
        BufferedReader k1 = null;
        StringTokenizer k2 = null;

        public BR() {
            k1 = new BufferedReader(new InputStreamReader(System.in));
        }

        public String nx() throws Exception {
            for (;;) {
                if (k2 == null || !k2.hasMoreTokens()) {
                    String temp = k1.readLine();
                    if (temp == null) return null;
                    k2 = new StringTokenizer(temp);
                }
                else
                    break;
            }

            return k2.nextToken();
        }

        public int ni() throws Exception {
            return Integer.parseInt(nx());
        }

        public double[] ndl(int n1) throws Exception {
            double[] fin = new double[n1];
            for (int i = 0; i < n1; i++) {
                fin[i] = Double.parseDouble(nx());
            }
            return fin;
        }
    }
    
}
