#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
const int hzy = 10007;
const int inf = (1 << 30) - 1;
int n;
double a[maxn];
double ans = (double)inf;
double sum = 0.0;
const double eps = 1e-20;
int cnt_double, cnt_int;
int s, t;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= 2 * n; i++) {
    scanf("%lf", &a[i]);
    double m = a[i] - (int)a[i];
    sum += m;
    if (m < eps)
      cnt_int++;
    else
      cnt_double++;
  }
  if (cnt_int >= cnt_double) {
    s = 0;
    t = cnt_double;
  } else {
    s = n - cnt_int;
    t = n;
  }
  for (int i = s; i <= t; i++) ans = min(ans, fabs(sum - i));
  printf("%.3f\n", ans);
  return 0;
}
