#include <bits/stdc++.h>
using namespace std;
struct A {
  double num;
  bool operator<(const A& c) const {
    return num - floor(num) < c.num - floor(c.num);
  }
};
A a[4005];
int main() {
  int n;
  double ans = 0.0;
  scanf("%d", &n);
  for (int i = 0; i < 2 * n; ++i)
    scanf("%lf", &a[i].num), ans += ceil(a[i].num);
  sort(a, a + 2 * n);
  int cnt = 0;
  for (int i = 0; i < 2 * n; ++i)
    if (a[i].num - floor(a[i].num) < 1e-6) ++cnt;
  for (int j = (n - cnt >= 0) ? n - cnt : 0; j <= min(n, 2 * n - cnt); ++j) {
    double res = 0.0;
    for (int i = cnt; i < cnt + j; ++i) res -= a[i].num - floor(a[i].num);
    for (int i = cnt + j; i < 2 * n; ++i) res += ceil(a[i].num) - a[i].num;
    if (fabs(res) < fabs(ans)) ans = res;
  }
  printf("%.3lf\n", fabs(ans));
  return 0;
}
