#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, m, i, j, k;
double a[N], b[N], c[N], ans, ansx;
bool cmp(double x, double y) { return x - floor(x) < y - floor(y); }
double absx(double x) {
  if (x >= 0)
    return x;
  else
    return -x;
}
double minx(double x, double y) {
  if (absx(x) < absx(y))
    return x;
  else
    return y;
}
int main() {
  scanf("%d", &n);
  for (i = 1; i <= 2 * n; i++) scanf("%lf", &a[i]);
  sort(a + 1, a + 2 * n + 1, cmp);
  for (i = 1; i <= 2 * n; i++) {
    if (floor(a[i]) == a[i])
      b[i] = c[i] = 0;
    else
      b[i] = a[i] - floor(a[i]), c[i] = a[i] - floor(a[i]) - 1;
  }
  ansx = 100000;
  for (i = 1; i <= 2 * n; i++) {
    ans = 0;
    for (j = 1; j <= n; j++) ans += b[i + j - 1];
    for (j = n + 1; j <= 2 * n; j++) ans += c[i + j - 1];
    ansx = minx(ans, ansx);
    b[i + 2 * n] = b[i];
    c[i + 2 * n] = c[i];
  }
  printf("%.3lf", absx(ansx));
  return 0;
}
