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.io.*;
//import java.lang.reflect.Array;

import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;


public class citylights {
    public static int[] arr;
    public static ArrayList<Integer> p;
    public static int[] val;
    public static long[] facto;
    public static long mod = 1000000007;
    public static long[] fillme;
    public static int ans = 0;
    public static int n, k;
    public static int [][]a;
    public static int []cnt=new int[27];
    static InputReader in;
    static PrintWriter out;
    public static HashSet<Long> hs=new HashSet<>();
    public static ArrayList<Integer> ar[];
    public static long x,y;
    public static long MOD= (long) (1e9+7);
    public static boolean []v;
//--------------------------------------My Code--------------------------------------------

    public static void main(String[] args) throws IOException {
        //arr = new int[1000001];
        //  p = new ArrayList<>();
        //  val = new int[1000001];
        // facto = new long[10000007];
        //tt=new int[100];
        //sieve();
        //  fact();
        //  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

        //InputReader in=new InputReader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        Scanner in=new Scanner(System.in);

        int n=in.nextInt();
        int count=0;
        double sum=0.0;
        for (int i=0;i<2*n;i++)
        {
            double x=in.nextDouble();
           // System.out.println(x-Math.floor(x));
            if((x-Math.floor(x))!=0.0)
            {
                count++;
            }
            sum+=(x-Math.floor(x));

        }
       // System.out.println(sum);
        int mmax=Math.min(count,n);
        int mmin=Math.max(0,count-n);
        double ans= 1e100;
        for (int i=mmin;i<=mmax;i++)
        {
            if(Math.abs(sum-i)<ans)
            {
                ans=Math.abs(sum-i);
            }
        }
        System.out.printf("%.3f\n",ans);
    }
    //-------------------------------------------Code ends-------------------------------
static class people{
        String name;
        int region;
        int point;

        public people(String name, int region, int point) {
            this.name = name;
            this.region = region;
            this.point = point;
        }
    }
 static long getFactorial(long number) {
        long factorial = 1;
        for (long i = 1; i <= number; ++i) {
            factorial *= i;
        }
        return factorial;
    }
    public static void primeFactors(long n)
    {
        // Print the number of 2s that divide n
        while (n%2==0)
        {
           hs.add((long) 2);
            n /= 2;
        }
        long k= (long) Math.sqrt(n);
        for (int i = 3; i <= k; i+= 2)
        {
            while (n%i == 0)
            {
                hs.add((long) i);
                n /= i;
            }
        }
        if (n > 2)
            hs.add(n);
    }

    public static long bsearchg(int[] a, int t) {
        long ans = 0;
        int low = 0;
        int high = a.length - 1;
        while (low <= high) {
            int mid = (low + high) / 2;
            if (a[mid] <= t) {
                ans = mid;

                low = mid + 1;
            } else
                high = mid - 1;


        }
        return ans;

    }


    private static long fib(long n) {
        if (n == 1) return y;
        if (n == 0) return x;
        long[][] F = new long[][]{{1, -1}, {1, 0}};
        matPow(F, n);
        return F[0][0];
        //return 0l;
    }

    private static void matPow(long[][] F, long n) {
        if (n == 0 || n == 1)
            return;
        long M[][] = new long[][]{{1, -1}, {1, 0}};

        matPow(F, n / 2);
        matrixMult(F, F);

        if (n % 2 != 0)
            matrixMult(F, M);
    }

    public static long MOD(long x,long y)
    {
        long xk=x;
        long yk=y;
        if(xk<0)
        {
           xk+=mod;
        }if(yk<0)
        {
            yk+=mod;
        }
        return (xk+yk)%mod;


    }
    private static void matrixMult(long A[][], long M[][]) {
        long a = MOD((A[0][0] * M[0][0]) %mod, (A[0][1] * M[1][0])%mod) % mod;
        long b = MOD((A[0][0] * M[0][1])%mod , (A[0][1] * M[1][1])%mod) % mod;
        long c = MOD((A[1][0] * M[0][0])%mod, (A[1][1] * M[1][0])%mod) % mod;
        long d = MOD((A[1][0] * M[0][1])%mod, (A[1][1] * M[1][1])%mod)% mod;

        A[0][0] = a;
        A[0][1] = b;
        A[1][0] = c;
        A[1][1] = d;
    }

    private static long lcm(long a, long b) {
        return (long) ((a * b) / euclgcd(a, b));
    }

    public static int[] rotate(int[] order, int by) {
        int length = order.length;
        int[] a = new int[length];
        for (int i = 0; i < length; i++) {
            a[(i + by) % length] = order[i];

        }
        return a;


    }

    public static long modinv(long x, long m) {
        return powmod(x, m - 2, m);

    }

    public static long eulertoitent(long n) {
        long res = n;
        for (int i = 2; i * i <= n; i++)
            if (n % i == 0) {
                while (n % i == 0)
                    n /= i;
                res -= res / i;
            }
        if (n > 1)
            res -= res / n;
        return res;


    }

    //calculate factorial till modulas
    public static void fact() {
        facto[0] = 1;
        for (int i = 1; i <= mod; i++) {
            facto[i] = (i * facto[i - 1]) % mod;
        }


    }

    public static void sieve() {
        arr[0] = 1;
        arr[1] = 1;

        for (int i = 2; i * i < 1000001; i++) {
            if (arr[i] == 0) {

                for (int j = i * i; j < 1000001; j += i) {
                    arr[j] = 1;
                }
            }
        }
        for (int i = 2; i < 1000001; i++) {
            if (arr[i] == 0)
                p.add(i);
        }
    }

    public static boolean isPrime(int n) {
        // Corner cases
        if (n <= 1) return false;
        if (n <= 3) return true;

        // This is checked so that we can skip
        // middle five numbers in below loop
        if (n % 2 == 0 || n % 3 == 0) return false;

        for (int i = 5; i * i <= n; i = i + 6)
            if (n % i == 0 || n % (i + 2) == 0)
                return false;

        return true;
    }

    public static long euclgcd(long a, long b) {
        if (b == 0)
            return a;
        else
            return euclgcd(b, a % b);

    }

    public static long powmod(long x, long n, long m) {
        long result = 1L;
        while (n > 0) {
            if (n % 2 == 1)
                result = (result * x) % m;
            x = (x * x) % m;
            n = n / 2;
        }

        return result;
    }


    static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }


}