#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
int n;
bool isint(double x) {
  if (fabs(floor(x + 0.5) - x) < eps) return true;
  return false;
}
int main() {
  while (~scanf("%d", &n)) {
    double sy = 0;
    int it = 0;
    int up, dn;
    for (int i = 0; i < n + n; i++) {
      double x;
      scanf("%lf", &x);
      if (isint(x))
        it++;
      else
        sy += x - floor(x);
    }
    up = min(n, n + n - it);
    dn = max(0, n - it);
    double ans = 10000000.0;
    for (double x = dn; x <= up; x += 1.0) ans = min(ans, fabs(sy - x));
    printf("%.3f\n", ans);
  }
  return 0;
}
