#include <bits/stdc++.h>
int n, ctdec, ct0, MinS, MaxS;
double MinSol = 100000, beforeS;
double Abs(double x) { return (x < 0) ? -x : x; }
double f_min(double x, double y) { return (x < y) ? x : y; }
int main() {
  int i, j;
  double x, t;
  scanf("%d", &n);
  for (i = 1; i <= 2 * n; i++) {
    scanf("%lf", &x);
    t = x - (int)x;
    beforeS += t;
    if (t == 0)
      ct0++;
    else
      ctdec++;
  }
  if (ctdec <= ct0) {
    MinS = 0;
    MaxS = ctdec;
  } else {
    MinS = n - ct0;
    MaxS = n;
  }
  for (i = MinS; i <= MaxS; i++) MinSol = f_min(MinSol, Abs(i - beforeS));
  printf("%.3lf", MinSol);
}
