#include <bits/stdc++.h>
using namespace std;
const int N = 4e3 + 50;
int n;
double ret, ans, tot, del;
struct point {
  double val, first;
  friend bool operator<(point a, point b) { return a.first < b.first; }
} a[N];
int main() {
  scanf("%d", &n);
  int l = 1, r = n * 2;
  for (int i = 1; i <= 2 * n; i++) {
    scanf("%lf", &a[i].val);
    tot += a[i].val;
    ans += ceil(a[i].val);
    a[i].first = ceil(a[i].val) - floor(a[i].val);
  }
  double del = ans - tot;
  sort(a + 1, a + 1 + 2 * n);
  for (int i = 1; i <= n; i++) {
    if (del > 0.5)
      del -= a[r--].first;
    else
      del -= a[l++].first;
  }
  printf("%.3lf\n", fabs(del));
  return 0;
}
