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. 
#include <bits/stdc++.h>
using namespace std;
int read_int() {
  int res;
  scanf("%d", &res);
  return res;
}
long long read_l() {
  long long res;
  scanf("%I64d\n", &res);
  return res;
}
double read_double() {
  double res;
  scanf("%lf", &res);
  return res;
}
int read_int_from(const char* from) {
  int res;
  FILE* f = fopen(from, "r");
  fscanf(f, "%d", &res);
  fclose(f);
  return res;
}
void read_ints(int* a, int n) {
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
  }
}
void read_doubles(double* a, int n) {
  for (int i = 0; i < n; ++i) {
    scanf("%lf", a + i);
  }
}
void read_all_ints(int* a, int& n) {
  n = 0;
  while (scanf("%d", a + n) > 0) ++n;
}
void for_each(int* begin, int* end, void (*fun)(int)) {
  for (; begin != end; ++begin) fun(*begin);
}
void print(int x) { printf("%d\n", x); }
void print_d(double x) { printf("%lf\n", x); }
void print_l(long long x) { printf("%I64d\n", x); }
void print_s(char* s) { printf("%s\n", s); }
void print_to(const char* fname, int x) {
  FILE* f = fopen(fname, "w");
  fprintf(f, "%d\n", x);
  fflush(f);
  fclose(f);
}
void print_ints(int* a, int n) {
  for (int i = 0; i < n; ++i) {
    if (i) {
      printf(" ");
    }
    printf("%d", a[i]);
  }
  print_s("");
}
void print_doubles(double* a, int n) {
  for (int i = 0; i < n; ++i) {
    if (i) {
      printf(" ");
    }
    printf("%lf", a[i]);
  }
  print_s("");
}
template <typename T>
void print_pairs(T* a, int n) {
  for (int i = 0; i < n; ++i) {
    cout << a[i].first << " " << a[i].second << endl;
  }
}
bool in_range(int value, int a, int b) { return value >= a && value < b; }
int pwr_by_mod(int n, int a, int mod) {
  if (a == 0) {
    return 1;
  }
  int r = 1;
  if (a % 2) r = n % mod;
  r = r * pwr_by_mod(n * n % mod, a / 2, mod) % mod;
  return r;
}
int gcd(int a, int b) {
  while (a) {
    a ^= b ^= a ^= b %= a;
  }
  return b;
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
pair<int, int> get_gcd_vector(int a, int b) {
  int g = gcd(abs(a), abs(b));
  return make_pair(a / g, b / g);
}
pair<int, int> negate_vector(pair<int, int> v) {
  return make_pair(-v.first, -v.second);
}
long long labs(long long x) {
  if (x < 0) return -x;
  return x;
}
int fenwick_get(int* B, int x) {
  int res = 0;
  for (int i = x; i > 0; i -= i & -i) {
    res += B[i];
  }
  return res;
}
int fenwick_add(int* B, int N, int x, int v) {
  for (int i = x; i < N; i += i & -i) {
    B[i] += v;
  }
}
int n;
double a[10010];
double a0[10010];
double a1[10010];
pair<double, int> d0[10010], d1[10010];
int main() {
  read_doubles(a, n = read_int() * 2);
  double initial = 0.0, res = 0.0;
  int ones = 0, zeros = n;
  for (int i = 0; i < n; ++i) {
    if (int(a[i] - 1e-9) != int(a[i] + 1e-9) ||
        (a[i] - 1e-9 < 0 && a[i] + 1e-9 > 0)) {
    } else {
      initial += a[i] - floor(a[i]);
      ones += 1;
      zeros -= 1;
    }
  }
  int used = 0;
  for (int i = 0; i < n / 2; ++i) {
    if (initial > 0.5 && ones > 0) {
      initial -= 1.0;
      ones -= 1;
    } else if (zeros == 0) {
      initial -= 1.0;
      ones -= 1;
    } else {
      zeros -= 1;
    }
  }
  printf("%.3lf\n", fabs(initial));
  return 0;
}
